Related Articles
Grey Orange Interview experience (Round 1)
• Last Updated : 21 Jan, 2019

Two rounds on Hacker Rank for shortlisting candidates

Round 1:

4 programming questions in 1 hour.

Program 1:

Playlist:

Give a string array, containing playlist of songs. Also the track currently playing is given.

Find the minimum number of moves(up/down) needed to play a required song, which is also given.

Eg: { a, b, c, d} are the songs in playlist. Currently playing track is a(index 0), Next song to be played is c, Minimum number of moves needed is 2.

Eg:  { a, b, c, d} are the songs in playlist. Currently playing track is d(index 3), Next song to be played is a, Minimum number of moves needed is 1.

From last song we can jump directly to song 1.

Program 2:

Find the sum of odd divisors, given an array of numbers.

Example: {1, 4, 7}

1: 1

4: 1, 2, 4

7: 1, 7

Sum of odd divisors: 1(1 )+ 1(1) + 2(1, 7) = 4

Program 3:

https://www.geeksforgeeks.org/minimum-swaps-required-group-1s-together/

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up