三津石智巳

👦🏻👦🏻👧🏻 Father of 3 | 🗺️ Service Reliability Engineering Manager at Rakuten Travel | 📚 Avid Reader | 👍 Wagashi | 👍 Caffe Latte | 👍 Owarai

【感想】Advanced Algorithms and Data Structures

データ構造とアルゴリズムへの興味が強くなる。

"I particularly like this metaphor: data structures are like nouns, while algorithms are like verbs.

 

I like this angle because, besides hinting at their different behavior, it implicitly reveals the mutual dependency between them. For instance, in English, to build a meaningful phrase, we need both nouns and verbs, a subject (or object), and an action performed (or endured)."

 

via Check out this quote from Advanced Algorithms and Data Structures - https://learning.oreilly.com/library/view/-/9781617295485/OEBPS/Text/ch01.htm

データ構造は名詞、アルゴリズムは動詞。

"It might seem counterintuitive that we use an array to represent a tree. After all, trees were invented to overcome array limitations. This is generally true, and trees have a number of advantages: they are more flexible and, if balanced, allow for better performance, with worst-case logarithmic search, insertion, and delete."

 

via Check out this quote from Advanced Algorithms and Data Structures - https://learning.oreilly.com/library/view/-/9781617295485/OEBPS/Text/ch02.htm

計算機科学をやった方には当たり前なのかもしれないが、面白い。なぜ、配列のデメリットを補うための木構造の実装に配列を使うのか。ヒープを考えた人の頭がよすぎる。

"Therefore, a fast algorithm that consumes quadratic space could be the best choice for small volumes of data, but it becomes impractical for some real case scenarios where you need to scale out. And so a slower algorithm using constant or logarithmic space could be the choice of election as our dataset grows."

 

via Check out this quote from Advanced Algorithms and Data Structures - https://learning.oreilly.com/library/view/-/9781617295485/OEBPS/Text/ch02.htm

OLTPでは、基本的にはtime complexity優先になるのではないか。

"The heap is one of the most universally used data structures. Together with stack and queue, it is the basis of almost every algorithm that needs to process the input in a specific order."

 

via Check out this quote from Advanced Algorithms and Data Structures - https://learning.oreilly.com/library/view/-/9781617295485/OEBPS/Text/ch02.htm

heapの優秀さがすごい。

"When the size of the heap is larger than available cache or than the available memory, or in any case where caching and multiple levels of storage are involved, then on average a binary heap requires more cache misses or page faults than a d-ary heap."

 

via Check out this quote from Advanced Algorithms and Data Structures - https://learning.oreilly.com/library/view/-/9781617295485/OEBPS/Text/ch02.htm

cache(memory)に乗り切らない場合、cacheへの読み込み効率も考慮しなければならない。

 

続きは次の記事で。