Tip 1 : Regulalry particpate in contests.
Tip 2 : along with DSA prepare your CS core subjects also.
Tip 3 : Make atleast 2 personal projects on trending tech stacks.
Tip 1 : Don't bluff in resume.
Tip 2 : You should have atleast 2 personal projects.
It was around 7 - 8 pm. it was the online coding round and 10 MCQs.


as in this question i have to find number of islands i will iterate my grid and call dfs, wherever, i find a[i][j] = 1 ,
then i increase my ans variable and call dfs for that index and I will explore all 4 dimensions wherever i can visit and also on visiting i will make that cell 0 as i dont want to visit it again.
this is my dfs function ---->
function dfs = [&](int i,int j)
{
if(i>=0 && j>=0 && i {
a[i][j] = '0';
dfs(i+1,j);
dfs(i-1,j);
dfs(i,j+1);
dfs(i,j-1);
}
};



i) Multiply ‘X’ by 2
ii) Subtract 1 from ‘X’
i will move backwards start with the target try to move to the start value . whenever target%2 ==1 i will increase value of target as intially was decrment operation and otherwise i will do target /= 2; as intially it was multiply by 2 operation.
solution is-->
sv --> starting value
while(target>sv)
{
ans++;
if(target%2==1)
{
target++;
}
else
{
target /= 2;
}
}
ans += (sv - target);
it was around 10 - 11 am. Interviewer was good but at the end he asked system design in which i was not comfortable in my 5th semester. I wasn't familiar with system design at that time.



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".
firstly i sorted the string and tried to change this problem target sum problem which can be easily solved by binary search approach. as a[i] + a[j] + a[k] = 0;
so we can say that , a[i] + a[j] = (-a[k).
design the database of zomato
Tip 1: i was not able to solve it as i was not familiar with system design at that time.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: