← Walmart questions

Find the k largest elements in an array

Filed under Walmart

Given an unsorted array of numbers and an integer k, return the k largest elements from the array. The output order does not matter.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Walmart questions

Collected from public candidate posts and coding forums. Updated Nov 2026.