PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Sybill

Implement an unbiased array shuffle

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of randomization techniques, in-place array manipulation, probabilistic uniformity, and algorithmic complexity within the coding & algorithms domain.

  • Medium
  • Sybill
  • Coding & Algorithms
  • Software Engineer

Implement an unbiased array shuffle

Company: Sybill

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Implement an in-place function shuffle(arr) in JavaScript that returns a uniformly random permutation of the input array. The algorithm must be unbiased (all n! permutations equally likely), run in O(n) time with O( 1) extra space, and handle empty or single-element arrays. Explain your approach, justify uniformity at a high level, and analyze time and space complexity.

Quick Answer: This question evaluates understanding of randomization techniques, in-place array manipulation, probabilistic uniformity, and algorithmic complexity within the coding & algorithms domain.

Sybill logo
Sybill
Aug 10, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
1
0

Implement an in-place function shuffle(arr) in JavaScript that returns a uniformly random permutation of the input array. The algorithm must be unbiased (all n! permutations equally likely), run in O(n) time with O(

  1. extra space, and handle empty or single-element arrays. Explain your approach, justify uniformity at a high level, and analyze time and space complexity.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Sybill•More Software Engineer•Sybill Software Engineer•Sybill Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.