Data Structure Notes for IBPS SO IT exam
Data Structure Notes for IBPS SO IT Officer Examination. Data structure is a collection of different data type. It includes array, file, record, table,tree,and so on.
Data structure is a way to storing and retrieving information from the computer.
Need or uses of data structure
- Data structure used in each and every program or software to manage data.
- It provide instruction to the user to complete the program.
- It used to store all the information.
Types of data structure
1. Primitive data type : This type of data type is operated by machine-level instruction. Eg :- integer, character data, pointer etc
2. Non -primitive data type : These data type derived from primitive data type. These are more complex. It contain homogeneous and heterogeneous information. Eg :- array, linked list, stack, queue etc
3. Linear data structure : These are single level data structure having elements in a sequence. Eg stack, queue.
4. Non linear data structure : these are multilevel data structure. Eg : graph and tree.
5. Static data structure : These type of data structure have fixed size. Eg : array
6. Dynamic data structure : which is dynamic in nature means which size changes during the program execution. Eg : linked list.
Operations on data structure
Insertion : Means addition of new element in a data structure.
Deletion : Means remove or delete a data element from a data structure.
Searching : Search a specific element in a data structure.
Traversal : Means processing all the element in the data structure.
Sorting : store the data element in a specified order. Increasing or decreasing.
Merging : Combine two similar data structure into a single and form new data structure.
- Initialize the queue.
- Visit the start node “S”
- Then see uninvited adjacent node of “S” and mark it visited and en-queue.
- Then mark and visit “B” and en-queue it.
- Next visit “C” and en-queue it.
- Now no uninvited adjacent node is left so dequeue “S”.
- Visit “D” which is adjacent to all node. Mark it visited and en-queue it.
Best Coaching Center for IBPS SO in Noida
Depth first search :
- nitialize the stack.
- Visit “S” and put it into the stack. Find unvisited and adjacent node of S”.
- Visit “A” and mark it visited and put it into stack.
- Then find unvisited and adjacent node of”A”, which is “D”. mark it visited and put it into stack.
- Choose “B”mark it visited and put down it into stack. Now “B” doesn’t have any unvisited node so pop “B”.
- Check unvisited node, which is “D” put it into the stack.
- Now “C” is unvisited so mark it visited and put it into stack.
A graph is a set of vertices and edges which are connected.
Directed graph and strongly connected graph.
Graph name vertices edges