Grey Orange Interview experience (Round 1)

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/

Write your Interview Experience or mail it to contribute@geeksforgeeks.org

Join Free Interview Preparation Course



My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.