Google Shitty question

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2025-03-20Added By Anonymous
Source: Link
🧭 Experience: unknown
✅ Outcome: unknown
💰 Compensation: unknown
📍 Location: unknown
🏢 Company: Google
🎓 Education: unknown
🎁 Benefits: unknown
📅 Offer Date: unknown

Given an integer n, generate a random permutation of numbers from 0 to n-1. Each number should appear exactly once in the output, and the order should be randomized. n = 7 Output = [6,0,4,1,3,2,5] n : 10^7 Guess what It's supposed to get solved with some Fisher-Yates shuffle Algorithm.
Comments