Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

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/

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!