Tip 1 : Practise coding problems daily, consistency is the key.
Tip 2 : Be confident when answering questions in an interview. Attitude and confidence play a big part in hiring.
Tip 3 : Prepare your fundamentals first.
Tip 1 : Keep it brief and concise.
Tip 2 : List your most recent experiences first.
It was an online coding round hiring team shared the contest link. The round lasted for 1.5 hours. Additionally, it has two coding questions—one medium and the other hard. And there were 20 MCQs on basic aptitude, computer networking, and operating systems.



An array c is a subarray of array d if c can be obtained from d by deletion of several elements from the beginning and several elements from the end.
For e.g.- The non-empty subarrays of an array [1,2,3] will be- [1],[2],[3],[1,2],[2,3],[1,2,3].
If arr = {-3,4,5}.
All the possible non-empty contiguous subarrays of “arr” are {-3}, {4}, {5}, {-3,4}, {4,5} and {-3,4,5}.
The product of these subarrays are -3, 4, 5, -12, 20 and -60 respectively.
The maximum product is 20. Hence, the answer is 20.
Can you solve this in linear time and constant space complexity?
The answer would unquestionably be the sum of the values in the entire array if there were no zeros or negative numbers.
Let's now assume there were only positive numbers, 0 (zero), and no negative numbers. Then, if 0s were encountered, we could maintain a current maximum product, which would be reset to A[i].
The situation slightly alters when the negative numbers are used. The maximum product in the positive and the maximum product in the negative must now be maintained. The maximum product in negative can be seen immediately when a negative number is encountered.



1) A prime number is a number that has only two factors: 1 and the number itself.
2) 1 is not a prime number.
Algorithm based approach - Sieve of Eratosthenes. The time complexity is O(N * loglog(N))
There were two interviewers present for the interview round. OOPS concepts and problem solving were tested. The round lasted approximately one hour. There were also some project-related questions.


1) A year is said to be a leap year if it has 366 days. Normal years have 365 days.
2) The integer 'N' does not contain any leading zeros.
A leap year satisfies the following conditions:
The year is multiple of 400.
The year is multiple of 4 and not multiple of 100.



Input: Consider the following Binary Tree:
Output:
Following is the level-order traversal of the given Binary Tree: [1, 2, 3, 5, 6, 4]
The approach I used was very similar to the level order traversal.Added an extra parameter to keep a track of each level in left-right or right-left way.


‘S’ = “aabcd”, ‘M’ = 2, ‘A’ = [0, 1]
After 1st operation i.e, reversing from [0, 4], ‘S’ = “dcbaa”.
After 2nd operation i.e, reversing from [1, 3], ‘S’ = “dabca”.
Hence, the answer is “dabca”.
Used simple iteration to solve these questions. While reversing a string iterate till half of the string length.
It was a discussion based round. There were behavioural questions. There were also some mathematical and aptitude questions. There were some questions about SAP, its products and offerings. This round was more like a one-on-one conversation.
Some mathematical and aptitude questions. Behavioural questions: what are your strength and weakness, about leadership skills. General questions about SAP. Project discussion.
Tip 1 : Be confident.
Tip 2 : Give honest responses rather than ones you've prepared in advance.

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?