Uploaded by prashantvikash100

DSA Topics (1)

advertisement
Some important topics of data structure and algorithms to learn
Day 1: Stick to a programming language like C/ C++/Java/Javascript. Make sure that you
are comfortable with pointers/objects.
Day 2: Understand the concept of Algorithmic complexity.
Day 3 - 6: Let’s start with some linear data structures.
1.
2.
3.
4.
5.
Arrays
Linked Lists
Strings
Stacks
Queues
Understand their basic operations (insert, delete, search, traversal) and their complexity.
Day 7 - 8: Let’s now learn some simple algorithms.
1. Sorting - Insertion sort, Merge sort, Quick sort, Heap sort, Bucket sort,
Counting sort, Radix sort, External sorting.
2. Search - Linear search, Binary Search.
Day 9 - 10: Let’s learn some non-linear data structures.
1. Tree a. Binary Tree, Binary Search Tree .
b. Heaps.
2. Graph - Breadth-first search, Depth-first search.
Day 1 covered topic ●
●
●
●
●
●
●
Data type & variable
Conditional statement - if / else
Loop - for loop, while loop, do while loop
Switch cases
Function
Pointer
Recursion
Day 1 task Data type & variable :
●
Write a program that takes a string as input and prints out its reverse.
Conditional statement - if / else :
●
Write a program that takes an integer as input and prints "Even" if the number is
even, and "Odd" if the number is odd.
Loop :
●
●
●
Write a program that uses a for loop to print out the numbers from 1 to 10.
Write a program that uses a while loop to print out the numbers from 1 to 10.
Write a program that uses a do-while loop to print out the numbers from 1 to 10.
Switch cases :
●
Write a program that takes a number from 1 to 7 as input and prints the
corresponding day of the week.
Function :
●
Write a program that defines a function to calculate the area of a circle. The function
should take the radius as input and return the area of the circle.
Pointer :
●
Write a program that declares a pointer variable and assigns it the address of an
integer variable. Then, use the pointer to modify the value of the integer variable.
Recursion :
●
Write a program that calculates the factorial of a number using recursion
Download