Walmart | OA | Feb 2024 | Counting Problem
Walmart · Question · Posted Apr 2026
Problem Statement: Counting Problem Bob has a collection of N numbers and needs to count "unique" numbers based on a specific process until the collection is empty. The Rules A number is considered for counting only if it is the current maximum in the collection. Check for Repetition: Look at the maximum number currently in the collection. If the maximum is uniue (appears only once): Increment Bob's count of unique numbers. Remove this number from the collection. Calculate number/2 (integer ...
The full answer & interview discussion are available to premium members.
Log in Create a free account