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 in the evening.It consist of 3 coding question. 1 -easy, 2 - hard problems. overall it was hard coding round.



It is the standard problem of knapsack dp.either take it or not.
code -->
int dp[n+1][c+1];
memset(dp,0,sizeof(dp));
int ans = 0;
for(int i = 1;i<=n;i++)
{
for(int j = 1;j<=c;j++)
{
if(w[i-1]>j)
{
dp[i][j] = dp[i-1][j];
}
else
{
dp[i][j]= max(v[i-1] + dp[i-1][j - w[i-1]],dp[i-1][j]);
}
}
}
return dp[n][c];



1. A ‘path’ is a sequence of adjacent pair nodes with an edge between them in the binary tree.
2. The ‘path’ doesn’t need to pass through the root.
3. The ‘path sum’ is the sum of the node’s data in that path.
you have to solve this problem by dfs approach. firstly explore left child and then right child. and call this dfs function for root and also keep track of max ans.
code --->
int dfs(TreeNode* root,int &ans)
{
if(root==NULL)
return 0;
int lsm = dfs(root->left,ans);
int rsm = dfs(root->right,ans);
ans = max({ans,root->val,root->val + max(lsm,rsm)});
return max({root->val,root->val + max(lsm,rsm)});
}



String ‘STR’ = “abcd”
Then all possible prefix of this ‘STR’ are:
"a", "ab", "abc", "abcd".
1. All the words in the ‘WORDS’ and the ‘SENTENCE’ contain only lower case English alphabets.
2. ‘SENTENCE’ does not have any leading and trailing spaces.
It was good there were two interviewers one was asking questions and other was analysing how i was giving answers. interviewer was good and supportive.



What is RAID structure in OS? What are the different levels of RAID configuration?
What is a Pipe and when it is used?
Linux based questions ->
How to find word count in a file?
I was not able to give proper answer of these questions as i haven't studied these things at that time.
Tip 1 : Study OS from javatpoint or gate smashers.
Tip 2 : Prepare linux concepts also for media.net

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?