Tip 1 : Do atleast 25 questions from each topic
Tip 2 : Revise basic concepts and most asked questions regularly
Tip 3 : Focus on reason and not on result
Tip 1 : Do not put false things on resume
Tip 2 : Keep it short and crisp
The test was in the evening (5pm)
There were two coding questions( one easy and one medium), questions were different for everyone.



If the given sequence ‘ARR’ has ‘N’ elements then the sorted wave array looks like -
‘ARR[0] >= ARR[1]’ and ‘ARR[1] <= ARR[2]’
‘ARR[2] >= ARR[3]’ and ‘ARR[3] <= ARR[4]’
‘ARR[4] >= ARR[5]’ and ‘ARR[5] <= ARR[6]’ And so on.
1. ‘ARR[0]’ must be greater than or equal to ‘ARR[1]’.
2. There can be multiple arrays that look like a wave array but you have to return only one.
3. We have an internal function that will check your solution and return 'True' in case your array is one of the solutions otherwise return 'False'.
The given array ‘ ARR = { 4, 3, 5, 2, 3, 1, 2 } ’
The below figure is a visual representation of the given ‘ARR’ and you can see we can express ‘ARR’ in a waveform array because
4>3 and 3<5
5>2 and 2<3
3>1 and 1<2
And it follows the condition of wave array.

Try to solve this problem in linear time complexity.
Step 1: sort the array A[]={2,3,4,5,5,6,7,8}
Step 2: Now store in ans array with two-pointer approach
one element from start and one from end and so on {2,8,3...



It was a technical round



getSize: Returns an integer. Gets the current size of the stack
isEmpty: Returns a boolean. Gets whether the stack is empty
push: Returns nothing. Accepts an integer. Puts that integer at the top of the stack
pop: Returns nothing. Removes the top element of the stack. It does nothing if the stack is empty.
getTop: Returns an integer. Gets the top element of the stack. Returns -1 if the stack is empty



If the given ‘HEIGHT’ array is [10,20,30,10], the answer 20 as the frog can jump from 1st stair to 2nd stair (|20-10| = 10 energy lost) and then a jump from 2nd stair to last stair (|10-20| = 10 energy lost). So, the total energy lost is 20.
It was also a technical round
First there were questions regarding the project
Then Some Oops questions
Then discussion about sorting algorithms
General difference between Java and c++ oops?
What is polymorphism and why needed?
Difference between deep and shallow copy?
Copy constructor?
Questions about Virtual
Template classes
Write algo fro quick and merge sort
Perks of bubble and insertion sorting
Write heapify algo and discuss how heap sort works
Time and space complexity of count sort
General questions
Tell me about your self
Why you want this position at SAP labs
Future Goals
Tip 1 : Be yourself
Tip 2 : Show interest in this position and organization

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?