Summary The queue is one of the most common abstract data structures Understanding how a queue works is trivial The implementation is only slightly more difficult than that of a stack Applications include: – Queuing clients in a client-server model – Breadth-first traversals of trees
49 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1325 | Lượt tải: 3
Stacks The stack is the simplest of all ADTs – Understanding how a stack works is trivial The application of a stack, however, is not in the implementation, but rather: – where possible, create a design which allows the use of a stack We looked at: – parsing, function calls, and reverse Polish
104 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1524 | Lượt tải: 2
Summary In this topic, we have introduced Abstract Lists – Explicit linear orderings – Implementable with arrays or linked lists • Each has their limitations • Introduced modifications to reduce run times down to Q(1) – Discussed memory usage and the sizeof operator – Looked at the String ADT – Looked at the vector class in the STL
28 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1462 | Lượt tải: 1
Summary In these slides we have looked at: – The run times of • Operators • Control statements • Functions • Recursive functions – We have also defined best-, worst-, and average-case scenarios We will be considering all of these each time we inspect any algorithm used in this class
98 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1478 | Lượt tải: 1
Algorithms Analysis We will use Landau symbols to describe the complexity of algorithms – E.g., adding a list of n doubles will be said to be a Q(n) algorithm An algorithm is said to have polynomial time complexity if its runtime may be described by O(nd) for some fixed d ≥ 0 – We will consider such algorithms to be efficient Problems that hav...
55 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1324 | Lượt tải: 1
Summary In this topic, we have introduced the concept of data structures – We discussed contiguous, linked, and indexed allocation – We looked at arrays and linked lists – We considered • Trees • Two-dimensional arrays • Hybrid data structures – We considered the run time of the algorithms required to perform various queries and operations...
35 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1432 | Lượt tải: 1
Summary In this topic, we have covered: – The Container ADT as a basic model of organizing data • Queries and operations on containers • Simple and associative containers • Unique or duplicate objects – Relationships between data • Linear ordering – Lexicographical ordering • Hierarchical ordering • Partial ordering • Equivalence relatio...
63 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1368 | Lượt tải: 0
Extending database capabilities for new applications: Example applications: storage and retrieval of images, videos, data mining (large amounts of data need to be stored and analyzed), spatial databases, time series applications, More complex data structures than relational representation. New data types except for the basic numeric a...
59 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1341 | Lượt tải: 1
In this topic, we have discussed: – We discussed the inductive principle – Ten different examples – Proof by induction can be applied incorrectly – Why it works – Strong induction – Some geometric problems
44 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1262 | Lượt tải: 1
A Quick Introduction to C++ If you have forgotten (or did not learn) what you should have covered in ECE 150, there is a full C++ tutorial on the ECE 250 web site starting from scratch The tutorial does not even assume you know what a variable is There are exercises and example code which you can run yourself
88 trang | Chia sẻ: vutrong32 | Ngày: 17/10/2018 | Lượt xem: 1493 | Lượt tải: 0