DSA track

DSA interview questions for freshers

Panel-ready DSA interview set questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.

43 Easy Trees DSA

How do you find the height of a binary tree?

Short take Full answer on next page

Simple meaning

Height is 1 plus the max of left and right subtree heights, with empty as -1 or 0 depending on the convention you state.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
46 Easy BST DSA

How do you insert a value into a BST?

Short take Full answer on next page

Simple meaning

Walk the same search path until a null child, then attach a new node there, rejecting duplicates if the tree forbids them.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
50 Easy Graphs DSA

When do you use BFS versus DFS on a graph?

Short take Full answer on next page

Simple meaning

BFS explores level by level and finds shortest paths in unweighted graphs, using a queue.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
56 Easy Greedy DSA

How does the activity-selection problem work?

Short take Full answer on next page

Simple meaning

Sort activities by finish time and repeatedly pick the next one that starts after the last chosen finish.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
Prev Page 3 of 4 Next
Chat with us