Tip 1 : Prepare well for core subjects, DSA indepth
Tip 2 : Know about latest tech used for designing system
Tip 3 : Prepare and practice coding from leetcode and geeksforgeeks
Tip 1 : Your Resume should consist of mainly skills, projects, and achievements. Projects would play a crucial part in your interview and you should have at least one most relevant and good project that shows how strong your concepts are in development.
Tip 2 : The most important tip is that never lie on your resume and like If you have worked upon some technology for the project part only and don't know the proper depth you could write basics only in your resume.
This was the online test taken on the Mettl Platform consist of two coding questions.



If ‘S’ = “beaninjacoder” and ‘ROW’ = 4
Then the zig-zag pattern is:
b j r
e n a e
a i c d
n o
Therefore, we will print “bjrenaeaicdno”.
Solution:
string convert(string s, int numRows) {
vector v(numRows, "");
int i = 0;
int n = s.length();
while(i=1 && i v[k].push_back(s[i++]);
}
string temp="";
for(auto &x: v)
temp+=x;
return temp;
}



In the case of two closest sums, print the smallest sum.
This was the technical round taken by the SDE-1 at microsft.



class Solution {
public:
int lengthOfLongestSubstring(string s) {
vector lastocc(128, -1);
int maxLen = 0, start = -1;
int l = s.length();
for (int i = 0; i != l; i++) {
if (lastocc[s[i]] > start)
start = lastocc[s[i]];
lastocc[s[i]] = i;
if ((i-start) > maxLen)
maxLen = i-start;
}
return maxLen;
}
};



1. UPDATE_INDEX(IND, VAL) - It updates the value of ARR[IND] to VAL.
2. SUM\_OF\_RANGE(l, r) - It returns the sum of the subarray ARR[l] to ARR[r] i.e. ARR[l] + ARR[l+1] + ARR[l+1] + ….. + ARR[r-1] + ARR[r].

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?