18 515 670 książek w 175 językach
Jednak się nie przyda? Nic nie szkodzi! Możesz zwrócić produkty nawet do 30 dni
Bon prezentowy to zawsze dobry pomysł. Obdarowany może za bon prezentowy wybrać cokolwiek z naszej oferty.
Nawet do 30 dni na zwrot
Fourteen days of drills that turn data structures and algorithms into something you can use under pressure.
This is a book of problems. Every rule is stated in as few words as it can be, shown working in a short program with its real captured output, and then handed back as drills. Nothing is asserted that is not also demonstrated: every listing in the book was run with CPython 3.11.0 and warnings turned into errors, and every printed result was captured from that run.
The programming problems build one real tool across the fourteen days. It is called tally, a command-line text index. It begins on Day 1 as a word counter and gains, day by day, a growing buffer, a document list, a query parser, a ranking, a heap, a postings list, a hash index, an ordered vocabulary, prefix search, a co-occurrence graph, related-term search and spelling suggestions. Each day's tool is the previous day's tool with one structure added, so the reason for each structure arrives before the structure does.
The two weeks run in three movements. Days 1 to 5 build the foundations: the cost model, arrays and dynamic arrays, linked lists, stacks and queues, and recursion with backtracking. Days 6 to 9 cover sorting, heaps and priority queues, searching and two pointers, and hash tables. Days 10 to 14 cover binary search trees, balanced trees and tries, graphs and traversal, shortest paths and spanning trees, and finally dynamic programming and greedy algorithms.
Every chapter has the same shape. Numbered sections state the rules. Twenty worked examples show each rule running, each with a complete program, its real output, a figure and a short explanation. Then a fixed ladder of five problem sets: review questions, worked problems with full solutions, worked programming problems with complete programs, and unassisted practice problems in both written and programming form. The answers to the review questions are at the end of the chapter. The practice problems have no answers anywhere, by design.
YOUR 14-DAY PATH
WEEK 1 - FOUNDATIONS AND SORTING
WEEK 2 - SEARCHING, TREES, GRAPHS AND DESIGN METHODS
WHO IT'S FOR
Students taking a data structures course who want drills rather than a reference. Readers preparing for an examination or a technical interview, where the measure is what can be produced without help. Working programmers who want fluency in the structures they already use by name. One programming language is assumed, with loops, functions and lists. No prior work on data structures is assumed, and no mathematics beyond logarithms and summation.
296 worked examples. 350 figures. Over 800 problems. 384 pages. Written to Python 3.11.
Fourteen days. Work them in order, and do the problems.