Tip 1 : practise competitive questions
Tip 2 : do projects
Tip 3 : commands on languages
Tip 1 : no false information
Tip 2 : do atleast 2 projects



Given BST will not contain duplicates.
A Binary Search Tree (BST) whose 2 nodes have been swapped is shown below.

After swapping the incorrect nodes:

Can you do this without using any extra space?



The traversal should proceed from left to right according to the input adjacency list.
Adjacency list: { {1,2,3},{4}, {5}, {},{},{}}
The interpretation of this adjacency list is as follows:
Vertex 0 has directed edges towards vertices 1, 2, and 3.
Vertex 1 has a directed edge towards vertex 4.
Vertex 2 has a directed edge towards vertex 5.
Vertices 3, 4, and 5 have no outgoing edges.
We can also see this in the diagram below.
BFS traversal: 0 1 2 3 4 5




V is the number of vertices present in graph G and vertices are numbered from 0 to V-1.
E is the number of edges present in graph G.
The Graph may not be connected i.e there may exist multiple components in a graph.
Tell me about your schedule?

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: