fru-n-quiz16 марта 2026В друзьяWe will then talk about an important class of abstract data types—containers—which will be our focus in the next five chapters.1 понравилось6
fru-n-quiz15 марта 2026В друзьяA singly linked list is a linked list with a single link per node, pointing to the next element in the list.1 понравилось9
fru-n-quiz15 марта 2026В друзьяA linked list is a sequence of linked nodes, where each node is itself a small data structure that stores a single value and a link to the next node.1 понравилось7
fru-n-quiz15 марта 2026В друзьяIn our case, for an unsorted array, we just have to bite the bullet and scan the whole array until we find a match (or don’t).1 понравилось17
fru-n-quiz14 марта 2026В друзьяWith sorted arrays, you have faster search, but you also have an extra cost to keep them sorted. Therefore, they should be preferred when there is a high read-to-write ratio (many more calls to the binary_search method than to insert and delete).1 понравилось2
fru-n-quiz14 марта 2026В друзьяSwapping the entry to be removed with the rightmost one in the array, and then deleting it<…>The last element will be outside the populated chunk (a word of caution: array loitering).1 понравилось2
fru-n-quiz14 марта 2026В друзьяPython, the programming language we use in this book, natively provides lists, a dynamically sized kind of array that allows any data type for its elements.1 понравилось5
fru-n-quiz14 марта 2026В друзьяIt would already be painful to create 24 different variables by hand,1 понравилось7
fru-n-quiz14 марта 2026В друзьяWe will begin our journey to the land of data structures with arrays1 понравилось7
fru-n-quiz14 марта 2026В друзьяwhat if she later needs to find even more distant relationships such as “friend of a friend of a friend” or the six degrees of Kevin Bacon? Unfortunately, an SQL database doesn’t seem to support everything she needs.Later in this book, you’ll learn that graphs would help Sandra tame highly relational data and that she could use the breadth-first search algorithms to explore indirect friend relationships.1 понравилось2
fru-n-quiz14 марта 2026В друзьяHave you ever heard of Maslow’s hammer, also known as the law of the instrument? It states that if your tool belt only has a hammer, you will be tempted to treat everything as a nail.<…>A hammer is unlikely to help if you need to tighten a bolt.1 понравилось1
fru-n-quiz14 марта 2026В друзьяData structures are the building blocks of computer science. They are important because they help organize data, solve difficult problems, improve efficiency, optimize memory usage, and avoid security risks.1 понравилось1
fru-n-quiz14 марта 2026В друзьяSome data structures are specifically designed to allow the efficient execution of certain algorithms, such as hash tables for key-based search.1 понравилось1
fru-n-quiz14 марта 2026В друзьяWhile you wait your turn, you are literally in another data structure, a queue!1 понравилось1
fru-n-quiz14 марта 2026В друзьяWhen you go shopping, you fill your physical cart with items you want to buy: there it is, a container. But which container in particular? I don’t want to spoil it for you, but you’ll be able to tell after reading this book.1 понравилось3
fru-n-quiz22 марта 2026В друзьяwe will look at two most common ways to implement a graph: the adjacency list and the adjacency matrix.3
fru-n-quiz22 марта 2026В друзьяA graph that has no cycles is called acyclic<…>A simple undirected acyclic graph that is not connected is called a forest.3
fru-n-quiz22 марта 2026В друзьяyou must remember that in data structures, as in life, there is no rose without a thorn (but many a thorn without a rose).2