Tip 1: You need a strong aptitude for knowledge as a first tip
Tip 2: Solve questions from previous coding questions
Tip 3: Make sure your resume includes at least two projects
Tip 1: Have at least 2 good projects mentioned in your resume with a link
Tip 2: Focus on skills, internships, projects, and experiences.
Tip 3: Make it simple, crisp, and one page
This was online test in which three coding questions were there.



1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
int threeSumClosest(vector& nums, int target) {
int n=nums.size();
int mini=INT_MIN;
int maxi=INT_MAX;
sort(nums.begin(),nums.end());
for(int k=0;k int i=k+1,j=n-1;
while(i int temp=nums[k]+nums[i]+nums[j];
if(temp mini=max(mini,temp);
i++;
}
else{
maxi=min(maxi,temp);
j--;
}
}
}
if(mini==INT_MIN){
return maxi;
}
if(maxi==INT_MAX){
return mini;
}
if(maxi-target return maxi;
}
return mini;
}



1. The heights of the buildings are positive.
2. Santa starts from the cell (0, 0) and he has to reach the building (N - 1, M - 1).
3. Santa cannot leave the grid at any point of time.
C++ solution
class Solution {
public:
int jump(vector& nums) {
int pos=0;
int des=0;
int jmp=0;
for(int i=0;i des=max(des,i+nums[i]);
if(pos==i){
pos=des;
jmp++;
}
}
return jmp;
}
};



A = “bc”, B = “abcddbc”.
String “A” is present at index 1, and 5(0-based index), but we will return 1 as it is the first occurrence of “A” in string “B”.
Can you solve this in linear time and space complexity?
C++ one line solution
class Solution {
public:
int strStr(string haystack, string needle) {
return haystack.find(needle);
}
};
This was a technical + HR Round, HR asked various behavioral questions during this interview.
Tell me about yourself
Tell me about the most challenging project
Tell me about the basic pillars of OOPs
what are acid properties
Am I ready to relocate to any location in India
ACID properties in DBMS
How will you handle conflict with your team member



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
Time complexity O(n)
class Solution {
public ListNode reverseList(ListNode head) {
ListNode prev=null;
ListNode current=head;
ListNode next=null;
while(current!=null){
next=current.next;
current.next=prev;
prev=current;
current=next;
}
return prev;
}
}

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?