Data Structures and Algorithms Week11: Revision
335 字
2 分钟
Data Structures and Algorithms Week11: Revision
Revision
Key points
- Basic conception
- Big O
- Data structure
- Array
- List
- Stack
- Queue
- Priority Queue
- Hash Table
- Tree
- Graph
- Algorithm
- Sorting
- Linear Search
- Binary Search
- Hashing
- Recursion
- Traverse Tree
- Path Finding
Final Examination
-
Two hours
-
Write the answers on the answer sheets
-
Type and weight of the questions
- Multiple Choice Questions(one correct answer) ------- 12 3 marks
- Short Answer Questions --------- 49 marks
- Encoding Questions -------- 15 marks
Question1
- What are the features of the Stack, the Queue, and the Priority Queue?
- Assume
srepresents one empty Stack andqrepresents one empty queue, the variablea,b,c,dshould be?
s.push(“China");s.push(“Italy");s.push(“Japan”)s.pop();s.push(“Germany");s.push(“England");s.pop();String a = s.pop();s.push(“Russia");String b = s.pop();
q.add(“China");q.add(“Italy");q.remove();q.add(“Japan");q.add(“Germany");q.add(“England”)q.remove();String c = q.remove();q.add(“Russia");String d = q.remove();- Please implement the basic operation of the stack created based on an array
- push
- pop
- peek
- isEmpty
- Please implement the basic operation of the queue created based on a single linked list
- add
- remove
- peek
- isEmpty
Question2
- What are the features of the hash table?
- How to implement the insertion operation and deletion operation on a hash table?
- How to solve the collision problem when inserting data into a hash table?
-
Devise a hash function
-
Table size is set to 13
-
Using the data in the following collection
{233, 56, 89, 123, 380, 239, 9, 60, 261, 334, 17}- Draw the hash table by using the quadratic probing way
- Draw the hash table by using the chaining way
-
How to calculate the average successful access and unsuccessful access steps on this hash table?
Question3
-
What are the features of the Binary Tree, the Complete Binary Tree and the Binary Search Tree?
-
Insert the following name into an empty Binary Search Tree without considering balancing it.
- “Thor”,“BalckPanther”,“StarLord”,“Mantis”,“Gamora”,“Strange”,“Groot”,“IronMan”,“Hulk”,“Falcon”,“AntMan”
-
Please draw the tree out.
-
Write down the values held in the nodes visited in searching in your tree for the name “IronMan”.
Question4
- The time complexity of the following sorting algorithms
- Insertion sorting
- Selection sorting
- Bubble sorting
- Quick Sorting
- How to implement the selection sorting and insertion sorting algorithms?
Question5
- Using Dijkstra’s algorithm to find the shortest path from A to E, showing the progress of path finding.
- State the traverse sequence of nodes by using DFT and BFT, starting from A.

Question6
- Please compare the data structures learned in this semester, and list the scenarios these data structures are suitable for.
支持与分享
如果这篇文章对你有帮助,欢迎分享给更多人或赞助支持!
Data Structures and Algorithms Week11: Revision
https://firefly.anka2.top/posts/obu/level5/semester2/dsa/week11/lecture/ 相关文章 智能推荐
1
Path finding Exercises
Data Structures and Algorithms Data Structures and Algorithms Seminar9: Dijkstra’s and A* algorithm
2
Data Structures and Algorithms Week9: Pathfinding
Data Structures and Algorithms Dijkstra's and A* algorithm, Priority Queues
3
Data Structures and Algorithms Week10: Comparing and making informed decisions
Data Structures and Algorithms Recap of abstract data types introduced, Comparison of implementations, Java Collections API, Determining the best abstract data type and implementation for a task
4
FunnyQueue
Data Structures and Algorithms Data Structures and Algorithms Seminar10: FunnyQueue
5
Data Structures and Algorithms Coursework2
Data Structures and Algorithms This coursework covers binary search trees, stacks, queues, graphs, and path-finding algorithms. The objective is to develop a comprehensive understanding and practical implementation of these data structures and algorithms and to apply them to solve relevant problems.
随机文章 随机推荐