+1-315-215-3377
+91-9980992834

Category: Data Structures and Algorithms Technical Interview Questions

Recruitment Made Easy

Technical Interview Question on Data Structures and Algorithms: Perfect Shuffle

What is an unbiased Shuffle algorithm? Consider an array with distinct elements A[1 … n] A perfectly unbiased shuffle algorithm would randomly shuffle all elements in the array such that after shuffling: 1.The probability that the shuffling operation would produce any particular permutation of the original array is the same for all permutations (i.e.) since…
Read more

Technical Interview Question on Data Structure and Algorithms: Count the number of inversions in an array

What is an inversion? Let A be an array of n distinct numbers. If i < j and A[i] > A[j], then the pair (i, j) is called an inversion of A. For example, the array {2,3,8,6,1} has 5 inversions: (2,1) (3,1) (8,6) (8,1) and (6,1) Trivial Solution to count the number of inversions in…
Read more