CS Dojo | Coding Interview: Can You RANDOMLY Reorder Array in O(N)? @CSDojo | Uploaded April 2017 | Updated October 2024, 1 week ago.
Coding Interview Question and Answer. Random permutation of an array will only take O(n) in time with Fisher-Yates shuffle or Knuth shuffle.
*Just getting started with coding interviews? Check out my "Get Ready for Your Coding Interview" course on Lynda.com:
lynda.com/Software-Development-tutorials/How-Ace-Developer-Interview/576698-2.html?lpk35=9181&utm_medium=ldc-partner&utm_source=CMPRC&utm_content=524&utm_campaign=CD20605&bid=524&aid=CD20605
(You'll get a 30-day trial with the link)
Coding Interview Question and Answer. Random permutation of an array will only take O(n) in time with Fisher-Yates shuffle or Knuth shuffle.
*Just getting started with coding interviews? Check out my "Get Ready for Your Coding Interview" course on Lynda.com:
lynda.com/Software-Development-tutorials/How-Ace-Developer-Interview/576698-2.html?lpk35=9181&utm_medium=ldc-partner&utm_source=CMPRC&utm_content=524&utm_campaign=CD20605&bid=524&aid=CD20605
(You'll get a 30-day trial with the link)