Ridley's new book, How Innovation Works, chronicles the history of innovation and argues that we need to change the way we think about innovation, to see it as an incremental, bottom-up, fortuitous process that happens to society as a direct result of the human habit of exchange.
Mục lục
Chapter 1: What Is an Algorithm?
Imagine texting a friend a recipe for your favorite noodle dish: “Add some water, cook until done, season to taste.”
Preview ReadingChapter 2: How Fast Is Fast?
Imagine your university asks you for a small favour. Here is a list of student ID numbers, and they want to know one thing: does any ID appear twice?
Preview ReadingChapter 3: Big-O and the Language of Growth
Imagine you write a small function for a class project. It takes a list of people and counts how many of them share a birthday.
Preview ReadingChapter 4: Abstract Data Types
Think about the last program you wrote that used a built-in list.
Preview ReadingChapter 5: Arrays, Dynamic Arrays, and Array Patterns
Imagine a music streaming service holding one million songs. A user taps song number 847,392.
Preview ReadingChapter 6: Linked Lists
You are building the “recently played” list for a music app. Every time a song finishes, it goes to the front of the list, because the newest thing should appear first.
Preview ReadingChapter 7: Stacks and Queues
Imagine you are building the undo feature for a text editor. Every action the user performs gets recorded.
Preview ReadingChapter 8: Hash Tables
Imagine you are building the sign-up page for a new social app. A visitor types the username elk, and you must answer one question immediately: is it taken?
Preview ReadingChapter 9: Searching and Elementary Sorting
For eight chapters you have been building containers. Arrays, linked lists, stacks, queues, hash tables — places to put things.
Preview ReadingChapter 10: Thinking Recursively
Imagine your laptop is nearly full and you want to find out how much space your Projects folder is using.
Preview ReadingChapter 11: Analyzing Recursive Algorithms
Two chapters ago you learned a reliable trick for measuring code: find the loops, work out how many times each one runs, multiply.
Preview ReadingChapter 12: Divide-and-Conquer in Action
You had just written selection sort, insertion sort, and bubble sort. They worked. They were honest.
Preview ReadingChapter 13: Trees, Binary Search Trees, and Balance
Imagine you are building the price catalogue for an online shop. Three things happen constantly, and all three have to be fast.
Preview ReadingChapter 14: Heaps and Priority Queues
Walk into any hospital emergency room and you will see a waiting area full of people.
Preview ReadingChapter 15: Specialized Structures
You have built an impressive toolbox. Arrays, linked lists, stacks, queues, hash tables, binary search trees, heaps — nine chapters of structures that store things and find them again.
Preview ReadingChapter 16: Choosing the Right Data Structure
Users should be able to jump straight to any song by its ID, and also browse every song released between 2015 and 2018, in order.
Preview Reading