Halloween Sale
Unlock all premium questions for over 30% off
Zero-Based Permutation Validation
Easy
Question
nums is an integer array holding n elements. It counts as a permutation of [0, 1, 2, ..., n-1] when each integer from 0 up to n-1 shows up in it exactly once, in any order. Some entries can lie outside that range. Rearranging or overwriting nums is fine, but apart from the input the solution may only use O(1) extra space.
...
Asked at:Tesla
More Tesla interview questions
- Nearest Route Checkpointmedium
- Minimum Latency Difference Pairseasy
- Fuel Dispenser Queue Simulationmedium
- Rank Vehicles by Contribution Scoremedium
- Caesar Cipher Fixed Rotationeasy
- Find Size of Largest Valid Subsetmedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.