Verwandte Artikel zu Data Structure & Algorithm in Python 3.11 in 14...

Data Structure & Algorithm in Python 3.11 in 14 Days: Master Arrays, Trees, Graphs, Sorting and Dynamic Programming Through Daily Drills (Learn Programming in 14 Days) - Softcover

Buch 10 von 20: Learn Programming in 14 Days

Saqib, Mohammad

 
9798193669722: Data Structure & Algorithm in Python 3.11 in 14 Days: Master Arrays, Trees, Graphs, Sorting and Dynamic Programming Through Daily Drills (Learn Programming in 14 Days)

Inhaltsangabe

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


  • Day 1 - The Cost Model and Complexity
  • Day 2 - Arrays and Dynamic Arrays
  • Day 3 - Linked Lists
  • Day 4 - Stacks and Queues
  • Day 5 - Recursion and Backtracking
  • Day 6 - Elementary and Divide-and-Conquer Sorting
  • Day 7 - Heaps, Priority Queues and Linear-Time Sorting

WEEK 2 - SEARCHING, TREES, GRAPHS AND DESIGN METHODS


  • Day 8 - Searching, Binary Search and Two Pointers
  • Day 9 - Hash Tables
  • Day 10 - Binary Trees and Binary Search Trees
  • Day 11 - Balanced Trees and Tries
  • Day 12 - Graphs and Traversal
  • Day 13 - Shortest Paths, Spanning Trees and Topological Order
  • Day 14 - Dynamic Programming and Greedy Algorithms

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.


Die Inhaltsangabe kann sich auf eine andere Ausgabe dieses Titels beziehen.