Tip 1 : Be well versed with everything written on your resume. Spend at least 1hr accumulating related topics of things mentioned on your resume and read about them. Most important thing as Software Developer is that you should be able to connect dots. Hence make sure to read a lot.
Tip 2 : If you know the answer, make it short but effective. If you don't know, say sorry and ask for hints. More time you waste guessing, more marks will be deducted, even if you end up giving right answer.
Tip 1 : Make it sharp. Single page resume is the best thing. Make sure the most relevant things like skill set, certification etc are in least cluttered and easily readable part of the page
Tip 2 : Remember, resume is only for shortlisting purpose. So make sure it doesn't take more than 3mins to read completely. Details of anything should never be a part of resume
Online Technical Interview (Coding Round) with 2 moderate level problem. Interviewer was helpful.



We cannot use the element at a given index twice.
Try to do this problem in O(N) time complexity.
I first applied check on array if it is null or only single element exists in array, then it will return empty array. Then, I created one hashmap, iterate array and applied condition if map contains key of array ith index, it will return array with values of map.get(arr[i],i). Else it will add key value pair in map with key as targetsum-arr[i] and value as i.



1. If ‘k’ is not present in the array, then the first and the last occurrence will be -1.
2. 'arr' may contain duplicate elements.
Input: 'arr' = [0,1,1,5] , 'k' = 1
Output: 1 2
Explanation:
If 'arr' = [0, 1, 1, 5] and 'k' = 1, then the first and last occurrence of 1 will be 1(0 - indexed) and 2.
Recursively iterate from the last index of the given array:
Base Case : If we reach the starting index recursively that mean the given element K is not present in the array.
Return Statement : If current element in the recursive call is equals to K, then return the current index from the function.
Recursive Call : If the element at current index is not equals to K, then recursively call for next iteration.
There were 2 coding questions asked.



1. Constructor:
It initializes the data members(queues) as required.
2. push(data) :
This function should take one argument of type integer. It pushes the element into the stack and returns nothing.
3. pop() :
It pops the element from the top of the stack and, in turn, returns the element being popped or deleted. In case the stack is empty, it returns -1.
4. top :
It returns the element being kept at the top of the stack. In case the stack is empty, it returns -1.
5. size() :
It returns the size of the stack at any given instance of time.
6. isEmpty() :
It returns a boolean value indicating whether the stack is empty or not.
Query-1(Denoted by an integer 1): Pushes an integer data to the stack. (push function)
Query-2(Denoted by an integer 2): Pops the data kept at the top of the stack and returns it to the caller. (pop function)
Query-3(Denoted by an integer 3): Fetches and returns the data being kept at the top of the stack but doesn't remove it, unlike the pop function. (top function)
Query-4(Denoted by an integer 4): Returns the current size of the stack. (size function)
Query-5(Denoted by an integer 5): Returns a boolean value denoting whether the stack is empty or not. (isEmpty function)
Operations:
1 5
1 10
2
3
4
Enqueue operation 1 5: We insert 5 at the back of the queue.
Queue: [5]
Enqueue operation 1 10: We insert 10 at the back of the queue.
Queue: [5, 10]
Dequeue operation 2: We remove the element from the front of the queue, which is 5, and print it.
Output: 5
Queue: [10]
Peek operation 3: We return the element present at the front of the queue, which is 10, without removing it.
Output: 10
Queue: [10]
IsEmpty operation 4: We check if the queue is empty.
Output: False
Queue: [10]
We will be using only one queue and make the queue act as stack. The idea behind this approach is to make one queue and push the first element in it. After the first element, we push the next element and then push the first element again and finally pop the first element. So, according to the FIFO rule of queue, second element that was inserted will be at the front and then the first element as it was pushed again later and its first copy was popped out. So, this acts as a stack and we do this at every step i.e. from the initial element to the second last element and the last element will be the one which we are inserting and since we will be pushing the initial elements after pushing the last element, our last element becomes the first element



Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.
2. Open brackets must be closed in the correct order.
()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Declare a character stack S.
Now traverse the expression string exp.
If the current character is a starting bracket (‘(‘ or ‘{‘ or ‘[‘) then push it to stack.
If the current character is a closing bracket (‘)’ or ‘}’ or ‘]’) then pop from stack and if the popped character is the matching starting bracket then fine else brackets are not balanced.
After complete traversal, if there is some starting bracket left in stack then “not balanced”

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?