Tip 1: For Data Structures & Algorithms, you could go with 450 DSA (recommended) or Striver’s list.
Tip 2: For OS, understand the concepts behind the topic. You can learn the concepts from the OS playlist and the theory.
Tip 3: For DBMS, again, focus on understanding the concepts behind the topic using Sanchit Jain’s playlist and the theory from here.
Tip 1: Don’t choose an overly fancy resume format.
Tip 2: Keep the resume crisp, short, and as formal as possible.



The length of the smallest valid substring '()' is 2.
'STR' = “()()())” here we can see that except the last parentheses all the brackets are making a valid parenthesis. Therefore, the answer for this will be 6.
The idea is to use a stack-based approach to track the indices of unmatched parentheses. It determines the length of valid (well-formed) parentheses substrings by keeping track of the position of the last unmatched closing parenthesis or the starting position of a valid substring.



Where distance between two points (x1, y1) and (x2, y2) is calculated as [(x1 - x2) ^ 2] + [(y1 - y2) ^ 2].
Using Sort
To solve this problem optimally, we first need to sort the intervals according to their starting times. Once the intervals are sorted, we can merge them in a single traversal. The idea is that in a sorted array of intervals, if arr[i] doesn’t overlap with arr[i-1], then arr[i+1] cannot overlap with arr[i-1] because the starting time of arr[i+1] must be greater than or equal to that of arr[i].
Follow the steps below to implement the approach:



Input:
4 5
0 1 5
0 2 8
1 2 9
1 3 2
2 3 6

In the given input, the number of vertices is 4, and the number of edges is 5.
In the input, following the number of vertices and edges, three numbers are given. The first number denotes node ‘X’, the second number denotes node ‘Y’ and the third number denotes the distance between node ‘X’ and ‘Y’.
As per the input, there is an edge between node 0 and node 1 and the distance between them is 5.
The vertices 0 and 2 have an edge between them and the distance between them is 8.
The vertices 1 and 2 have an edge between them and the distance between them is 9.
The vertices 1 and 3 have an edge between them and the distance between them is 2.
The vertices 2 and 3 have an edge between them and the distance between them is 6.
1. There are no self-loops(an edge connecting the vertex to itself) in the given graph.
2. There can be parallel edges i.e. two vertices can be directly connected by more than 1 edge.
The idea is to generate a Shortest Path Tree (SPT) with a given source as the root. Maintain an adjacency matrix and two sets: one set contains the vertices included in the shortest path tree, while the other set includes the vertices not yet included. At every step of the algorithm, find a vertex from the latter set (the set of vertices not yet included) that has the minimum distance from the source.
How much of a risk-taking person you are?
Suppose you are not comfortable with working with a person or that person not working according to what you want, how would you behave in this situation? Did this happen before?
Would you lead others or are willing to follow others?

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?