Program to solve problems on DSA
Programmers Interview Questions
22,499 programmers interview questions shared by candidates
What was the difficult problem you have faced and how did you solved it?
There is an array of n size.... elements appear exactly twice...and elements are 1 to N//2 - 1.. For ex N = 8 ..arr = 3 2 4 2 1 3 1 4 And another array bonus of size N ... If an soldier can attack...if he gets a partner to the right....and the max bonus is within the range l to r ....get max bonus ...and if no partner found ....no bonus to be collected.... Rules for partner... The right element...new partner to be found should be a multiple of the current l partner... Once a partner is found..max bonus can be taken from the range...in above example ..index 0 ....element is 3....his next partner will be either 3 only or 6(here not the case...).. So l= 3 r = 3...li (index0) ri (index5)...so index 0soldier found an partner..so he can attack ...so he will choose the max value from bonus list 0...5 index ...if bonus list was say suppose 30 10 40 20 10 40 20 70...he'll pick 40...as it lies in the scope of attack (index 0-5)... 40 is added to total bonus ..... Like wise ..every index is checked for partner ..and mac bonus in tht range selected and added .... Final Max Bonus to be returned....
pillars of object oriented programming
Let's talk about Tesla
Tell me about yourself (your achievements, and why do you want to apply for the programme)
Would you be comfortable working for a tobacco industry?
What do you know about the company?
Puzzles and situational
What is your best yet?
Viewing 2761 - 2770 interview questions