Introduction to Data Structures
- Array is a random access data structure
Linked List is a sequential data structure a. Advantages of linked list are we can add data dynamically at any point of time, Size of the array need not mention at the start of the time.
First In Last Out
First in First Out
Binary tree is a tree which has left node and right node Graph Theroy is study of relationships between edges and vertexes. In graph theory tree is an undirected, connected and cyclic graph.
Depth first traversal
- In this preorder traversal we will go left, root and then right node.
- In this preorder traversal we will go root,left and then right node.
- In this preorder traversal we will go left,right and then root node.
Searching and Sorting
Linear search is a way to find an element with in a list by sequential going through each one
Time complexity N
Binary search works on the sorted array. The comparsion of the element to be found is done at the half of the array . If the match is not found then the element goes to the first half or the second half based on the comparision. Time complexity **logN**
In this case the minimum value is found and swaps with the first element and so on till all the elements are sorted.
This is like playing a cards. Imaging you have one card at your hand. You are picking a card and placing it exactly at the position.
Divide and Conquer , More work in combine less work in divide
More work in divide and less work in conquer
Functional Dependency in RDBMS A -> Atomcity C -> Consistency I -> Isolation D -> Durability Logical Physcial External DML (Data Manipulation language) SELECT INSERT UPDATE DELETE DCL GRANT REVOKE TCL COMMIT ROLLBACK Candidate Key Super Keys An unique combination of keys that is useful identify the row