Tip 1 : Do not rush into things. Learning takes time. Focus should be on the concepts and not just on leaving topics half-prepared. Devote 70% of both time and effort to DSA. I solved a total of around 500 questions on sites like GFG and Leetcode. Do not repeat similar questions just to increase the count of the number of questions
Tip 2 : Competitive Programming is a bonus and not a necessity, rather focus on core DSA based problems before trying CP. Do not pursue CP if you do not like it. Devote that extra time to core CS subjects and aptitude preparation.
Tip 3 : Projects play an important role too, do no ignore them. Try to get your hands dirty with a little bit of every field i.e., frontend, backend, and database.
Tip 1 : Try to make a single-page resume. Highlight skills, projects, and work experience more than CGPA. Ensure proper spacing and font to maintain professionalism.
Tip 2 : Does not lie on a resume. Everything written on your resume must be known by you in and out.



1) A string is valid only if every left parenthesis has corresponding right parentheses in the same order.
For example Given ‘STR’ = (())()) is not a valid string, whereas ‘STR’ = (())() is a valid string.
1). Here, l used a stack for checking the validity of parentheses, and later remove the indexes of invalid parentheses from the string s.
2). First, iterate the string s and mark the index of those characters which need to be removed to make it parentheses string using a special symbol '#'.
Here, a stack is used for finding the valid pair of parentheses, and while doing so also mark the indexes of invalid parentheses in s.
3). Finally, iterate s again and append non-marked symbol (#) to ans.



You have been given an integer ‘X’ and a non-decreasing sorted doubly linked list with distinct nodes.
Your task is to return the number of triplets in the list that sum up to the value ‘X’.
Input Format :
The first line contains a single integer ‘T’ denoting the number of test cases. The test cases follow.
The first line of each test case contains a single integer ‘X’.
The second line of the input contains the elements of the doubly linked list separated by a single space and terminated by -1. Hence, -1 would never be a list element.



• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
It is guaranteed that a BST can be always constructed from the given preorder traversal. Hence, the answer will always exist.
From PREORDER = [20, 10, 5, 15, 13, 35, 30, 42] , the following BST can be constructed:

You have been given an array/list 'PREORDER' representing the preorder traversal of a BST with 'N' nodes. All the elements in the given array have distinct values.
Your task is to construct a binary search tree that matches the given preorder traversal.
A binary search tree (BST) is a binary tree data structure that has the following properties:
• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
Find the 2 nd higest salary?
select *from employee
group by salary
order by salary desc limit 1,1;

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?