0% found this document useful (0 votes)
26 views1 page

Ads - Lab Exercises

Uploaded by

SACHIN JEEVAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views1 page

Ads - Lab Exercises

Uploaded by

SACHIN JEEVAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Trees:

1. Binary Tree Traversal: Implement algorithms for inorder, preorder, and


postorder traversal of a binary tree.
2. Binary Tree Diameter: Write a function to find the diameter of a binary tree
(the longest path between any two nodes).

Graphs:

3. Breadth-First Search (BFS): Implement BFS to traverse a graph and find the
shortest path from a source node to all other nodes.
4. Depth-First Search (DFS): Write a function to perform DFS on a graph and
identify connected components.

Backtracking:

5. N-Queens Problem: Implement a solution to place N queens on an NxN


chessboard such that no two queens attack each other.
6. Sudoku Solver: Write a program to solve a Sudoku puzzle using backtracking.

Dynamic Programming:

7. Fibonacci Series: Implement a function to find the nth Fibonacci number


using dynamic programming to optimize recursive calls.
8. Longest Common Subsequence (LCS): Write a function to find the length of
the longest common subsequence between two strings.

Divide and Conquer:

9. Merge Sort: Implement the merge sort algorithm to sort an array of elements.
10. Binary Search: Write a function to perform binary search on a sorted array to
find a target element.

You might also like