|
@@ -527,7 +527,7 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
|
|
- [ ] [Singly Linked Lists (video)](https://www.coursera.org/learn/data-structures/lecture/kHhgK/singly-linked-lists) (listas ligadas individualmente (vídeo))
|
|
- [ ] [Singly Linked Lists (video)](https://www.coursera.org/learn/data-structures/lecture/kHhgK/singly-linked-lists) (listas ligadas individualmente (vídeo))
|
|
- [ ] [CS 61B - Linked Lists (video)](https://www.youtube.com/watch?v=sJtJOtXCW_M&list=PL-XXv-cvA_iAlnI-BQr9hjqADPBtujFJd&index=5) (CS 61B - Listas Ligadas (vídeo))
|
|
- [ ] [CS 61B - Linked Lists (video)](https://www.youtube.com/watch?v=sJtJOtXCW_M&list=PL-XXv-cvA_iAlnI-BQr9hjqADPBtujFJd&index=5) (CS 61B - Listas Ligadas (vídeo))
|
|
- [ ] [C Code (video)](https://www.youtube.com/watch?v=QN6FPiD0Gzo) (Código em C (vídeo))
|
|
- [ ] [C Code (video)](https://www.youtube.com/watch?v=QN6FPiD0Gzo) (Código em C (vídeo))
|
|
- - não o vídeo inteiro, apenas partes sobre estrutura de nodes (nós) e alocação de memória.
|
|
|
|
|
|
+ - não o vídeo inteiro, apenas as partes sobre estrutura de nodes (nós) e alocação de memória.
|
|
- [ ] Listas Ligadas vs Arrays:
|
|
- [ ] Listas Ligadas vs Arrays:
|
|
- [Core Linked Lists Vs Arrays (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/rjBs9/core-linked-lists-vs-arrays) (Fundamental: Listas Ligadas vs Arrays (vídeo))
|
|
- [Core Linked Lists Vs Arrays (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/rjBs9/core-linked-lists-vs-arrays) (Fundamental: Listas Ligadas vs Arrays (vídeo))
|
|
- [In The Real World Linked Lists Vs Arrays (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/QUaUd/in-the-real-world-lists-vs-arrays) (No Mundo Real: Listas Ligadas vs Arrays (vídeo))
|
|
- [In The Real World Linked Lists Vs Arrays (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/QUaUd/in-the-real-world-lists-vs-arrays) (No Mundo Real: Listas Ligadas vs Arrays (vídeo))
|
|
@@ -621,7 +621,7 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
|
|
|
|
|
|
- ### Lógica binária
|
|
- ### Lógica binária
|
|
- [ ] [Bits cheat sheet](https://github.com/jwasham/google-interview-university/blob/master/extras/cheat%20sheets/bits-cheat-cheet.pdf) (Folha de consultas sobre Bits) - você deve conhecer várias das potências de 2 de (2^1 até 2^16 e 2^32)
|
|
- [ ] [Bits cheat sheet](https://github.com/jwasham/google-interview-university/blob/master/extras/cheat%20sheets/bits-cheat-cheet.pdf) (Folha de consultas sobre Bits) - você deve conhecer várias das potências de 2 de (2^1 até 2^16 e 2^32)
|
|
- - [ ] Consiga um bom entendimento sobre manipular bits com: &, |, ^, ~, >>, <<
|
|
|
|
|
|
+ - [ ] Consiga um bom entendimento sobre manipulação de bits com: &, |, ^, ~, >>, <<
|
|
- [ ] [words](https://en.wikipedia.org/wiki/Word_(computer_architecture)) (palavras)
|
|
- [ ] [words](https://en.wikipedia.org/wiki/Word_(computer_architecture)) (palavras)
|
|
- [ ] Boa introdução:
|
|
- [ ] Boa introdução:
|
|
[Bit Manipulation (video)](https://www.youtube.com/watch?v=7jkIUgLC29I) (Manipulação de Bit (vídeo))
|
|
[Bit Manipulation (video)](https://www.youtube.com/watch?v=7jkIUgLC29I) (Manipulação de Bit (vídeo))
|
|
@@ -631,10 +631,10 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
|
|
- [ ] [Bithacks](https://graphics.stanford.edu/~seander/bithacks.html) (Snippets/Fragmentos de código, um tipo de cheatsheet (folha de consultas))
|
|
- [ ] [Bithacks](https://graphics.stanford.edu/~seander/bithacks.html) (Snippets/Fragmentos de código, um tipo de cheatsheet (folha de consultas))
|
|
- [ ] [The Bit Twiddler](http://bits.stephan-brumme.com/)
|
|
- [ ] [The Bit Twiddler](http://bits.stephan-brumme.com/)
|
|
- [ ] [The Bit Twiddler Interactive](http://bits.stephan-brumme.com/interactive.html) (Interativo)
|
|
- [ ] [The Bit Twiddler Interactive](http://bits.stephan-brumme.com/interactive.html) (Interativo)
|
|
- - [ ] Complemento de 2s e 1s
|
|
|
|
- - [Binary: Plusses & Minuses (Why We Use Two's Complement) (video)](https://www.youtube.com/watch?v=lKTsv6iVxV4) (Binário: Vantagens & Desvantagens (Por Que Usamos Complemento de 2s) (vídeo))
|
|
|
|
- - [1s Complement](https://en.wikipedia.org/wiki/Ones%27_complement) (Complemento de 1s)
|
|
|
|
- - [2s Complement](https://en.wikipedia.org/wiki/Two%27s_complement) (Complemento de 2s)
|
|
|
|
|
|
+ - [ ] Complemento de 2 e 1
|
|
|
|
+ - [Binary: Plusses & Minuses (Why We Use Two's Complement) (video)](https://www.youtube.com/watch?v=lKTsv6iVxV4) (Binário: Vantagens & Desvantagens (Por Que Usamos Complemento de 2) (vídeo))
|
|
|
|
+ - [1s Complement](https://en.wikipedia.org/wiki/Ones%27_complement) (Complemento de 1)
|
|
|
|
+ - [2s Complement](https://en.wikipedia.org/wiki/Two%27s_complement) (Complemento de 2)
|
|
- [ ] contagem de bits fixos
|
|
- [ ] contagem de bits fixos
|
|
- [4 ways to count bits in a byte (video)](https://youtu.be/Hzuzo9NJrlc) (4 maneiras de contar bits em um byte (vídeo))
|
|
- [4 ways to count bits in a byte (video)](https://youtu.be/Hzuzo9NJrlc) (4 maneiras de contar bits em um byte (vídeo))
|
|
- [Count Bits](https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan) (Contagem de Bits)
|
|
- [Count Bits](https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan) (Contagem de Bits)
|
|
@@ -646,88 +646,88 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
|
|
- [ ] valor absoluto:
|
|
- [ ] valor absoluto:
|
|
- [Absolute Integer](http://bits.stephan-brumme.com/absInteger.html) (Número Inteiro Absoluto)
|
|
- [Absolute Integer](http://bits.stephan-brumme.com/absInteger.html) (Número Inteiro Absoluto)
|
|
|
|
|
|
-## Trees
|
|
|
|
-
|
|
|
|
-- ### Trees - Notes & Background
|
|
|
|
- - [ ] [Series: Core Trees (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/ovovP/core-trees)
|
|
|
|
- - [ ] [Series: Trees (video)](https://www.coursera.org/learn/data-structures/lecture/95qda/trees)
|
|
|
|
- - basic tree construction
|
|
|
|
- - traversal
|
|
|
|
- - manipulation algorithms
|
|
|
|
- - BFS (breadth-first search)
|
|
|
|
- - [MIT (video)](https://www.youtube.com/watch?v=s-CYnVz-uh4&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=13)
|
|
|
|
- - level order (BFS, using queue)
|
|
|
|
- time complexity: O(n)
|
|
|
|
- space complexity: best: O(1), worst: O(n/2)=O(n)
|
|
|
|
- - DFS (depth-first search)
|
|
|
|
- - [MIT (video)](https://www.youtube.com/watch?v=AfSk24UTFS8&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=14)
|
|
|
|
- - notes:
|
|
|
|
- time complexity: O(n)
|
|
|
|
|
|
+## Árvores
|
|
|
|
+
|
|
|
|
+- ### Árvores - Anotações e Fundamentos
|
|
|
|
+ - [ ] [Series: Core Trees (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/ovovP/core-trees) (Série: Árvores Fundamentais (vídeo))
|
|
|
|
+ - [ ] [Series: Trees (video)](https://www.coursera.org/learn/data-structures/lecture/95qda/trees) (Série: Árvores (vídeo))
|
|
|
|
+ - contrução básica de árvore
|
|
|
|
+ - transversal
|
|
|
|
+ - algorítmos de manipulação
|
|
|
|
+ - Busca em largura (conhecido no Inglês como BFS ou breadth-first search)
|
|
|
|
+ - [MIT (vídeo)](https://www.youtube.com/watch?v=s-CYnVz-uh4&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=13)
|
|
|
|
+ - ordem de nível (busca em largura, usando filas)
|
|
|
|
+ complexidade de tempo: O(n)
|
|
|
|
+ complexidade de espaço: melhor: O(1), pior: O(n/2)=O(n)
|
|
|
|
+ - Busca em profundidade (conhecido no Inglês como DFS ou depth-first search)
|
|
|
|
+ - [MIT (vídeo)](https://www.youtube.com/watch?v=AfSk24UTFS8&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=14)
|
|
|
|
+ - anotações:
|
|
|
|
+ complexidade de tempo: O(n)
|
|
space complexity:
|
|
space complexity:
|
|
- best: O(log n) - avg. height of tree
|
|
|
|
- worst: O(n)
|
|
|
|
- - inorder (DFS: left, self, right)
|
|
|
|
- - postorder (DFS: left, right, self)
|
|
|
|
- - preorder (DFS: self, left, right)
|
|
|
|
-
|
|
|
|
-- ### Binary search trees: BSTs
|
|
|
|
- - [ ] [Binary Search Tree Review (video)](https://www.youtube.com/watch?v=x6At0nzX92o&index=1&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6)
|
|
|
|
- - [ ] [Series (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/p82sw/core-introduction-to-binary-search-trees)
|
|
|
|
- - starts with symbol table and goes through BST applications
|
|
|
|
- - [ ] [Introduction (video)](https://www.coursera.org/learn/data-structures/lecture/E7cXP/introduction)
|
|
|
|
- - [ ] [MIT (video)](https://www.youtube.com/watch?v=9Jry5-82I68)
|
|
|
|
|
|
+ melhor: O(log n) - altura média da árvore
|
|
|
|
+ pior: O(n)
|
|
|
|
+ - em-ordem ou ordem simétrica(na busca em profundidade (ou DFS): percorre subárvore esquerda em ordem simétrica (em-ordem), visita a raiz, percorre subárvore direita em ordem simétrica)
|
|
|
|
+ - pós-ordem (na busca em profundidade (ou DFS): percorre subárvore esquerda em pós-ordem, percorre subárvore direita em pós-ordem, visita a raiz)
|
|
|
|
+ - pré-ordem (na busca em profundidade (ou DFS): visita a raiz, percorre subárvore esquerda em pré-ordem, percorre subárvore direita em pré-ordem)
|
|
|
|
+
|
|
|
|
+- ### Árvores binárias de busca: ABB
|
|
|
|
+ - [ ] [Binary Search Tree Review (video)](https://www.youtube.com/watch?v=x6At0nzX92o&index=1&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6) (Revisão de Árvores Binárias de Busca (vídeo))
|
|
|
|
+ - [ ] [Série (vídeo)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/p82sw/core-introduction-to-binary-search-trees)
|
|
|
|
+ - começa com tabela de símbolos e passa por aplicações de ABB
|
|
|
|
+ - [ ] [Introduction (video)](https://www.coursera.org/learn/data-structures/lecture/E7cXP/introduction) (Introdução (vídeo))
|
|
|
|
+ - [ ] [MIT (vídeo)](https://www.youtube.com/watch?v=9Jry5-82I68)
|
|
- C/C++:
|
|
- C/C++:
|
|
- - [ ] [Binary search tree - Implementation in C/C++ (video)](https://www.youtube.com/watch?v=COZK7NATh4k&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=28)
|
|
|
|
- - [ ] [BST implementation - memory allocation in stack and heap (video)](https://www.youtube.com/watch?v=hWokyBoo0aI&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=29)
|
|
|
|
- - [ ] [Find min and max element in a binary search tree (video)](https://www.youtube.com/watch?v=Ut90klNN264&index=30&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P)
|
|
|
|
- - [ ] [Find height of a binary tree (video)](https://www.youtube.com/watch?v=_pnqMz5nrRs&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=31)
|
|
|
|
- - [ ] [Binary tree traversal - breadth-first and depth-first strategies (video)](https://www.youtube.com/watch?v=9RHO6jU--GU&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=32)
|
|
|
|
- - [ ] [Binary tree: Level Order Traversal (video)](https://www.youtube.com/watch?v=86g8jAQug04&index=33&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P)
|
|
|
|
- - [ ] [Binary tree traversal: Preorder, Inorder, Postorder (video)](https://www.youtube.com/watch?v=gm8DUJJhmY4&index=34&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P)
|
|
|
|
- - [ ] [Check if a binary tree is binary search tree or not (video)](https://www.youtube.com/watch?v=yEwSGhSsT0U&index=35&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P)
|
|
|
|
- - [ ] [Delete a node from Binary Search Tree (video)](https://www.youtube.com/watch?v=gcULXE7ViZw&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=36)
|
|
|
|
- - [ ] [Inorder Successor in a binary search tree (video)](https://www.youtube.com/watch?v=5cPbNCrdotA&index=37&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P)
|
|
|
|
|
|
+ - [ ] [Binary search tree - Implementation in C/C++ (video)](https://www.youtube.com/watch?v=COZK7NATh4k&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=28) (Árvore binária de busca - Implementação em C/C++ (vídeo))
|
|
|
|
+ - [ ] [BST implementation - memory allocation in stack and heap (video)](https://www.youtube.com/watch?v=hWokyBoo0aI&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=29) (Implementação de ABB - alocação de memória estática (stack) e dinâmica (heap) (vídeo))
|
|
|
|
+ - [ ] [Find min and max element in a binary search tree (video)](https://www.youtube.com/watch?v=Ut90klNN264&index=30&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P) (Encontrar elementos min e max em uma árvore binária de busca (vídeo))
|
|
|
|
+ - [ ] [Find height of a binary tree (video)](https://www.youtube.com/watch?v=_pnqMz5nrRs&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=31) (Encontrar altura de uma árvore binária (vídeo))
|
|
|
|
+ - [ ] [Binary tree traversal - breadth-first and depth-first strategies (video)](https://www.youtube.com/watch?v=9RHO6jU--GU&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=32) (Percurso de uma árvore binária - estratégias de busca em largura e busca em profundidade (vídeo))
|
|
|
|
+ - [ ] [Binary tree: Level Order Traversal (video)](https://www.youtube.com/watch?v=86g8jAQug04&index=33&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P) (Árvore binária: Percurso de Ordens de Níveis (vídeo))
|
|
|
|
+ - [ ] [Binary tree traversal: Preorder, Inorder, Postorder (video)](https://www.youtube.com/watch?v=gm8DUJJhmY4&index=34&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P) (Percurso de árvore binária: Pré-ordem, Em-ordem (ordem simétrica), Pós-ordem (vídeo))
|
|
|
|
+ - [ ] [Check if a binary tree is binary search tree or not (video)](https://www.youtube.com/watch?v=yEwSGhSsT0U&index=35&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P) (Verificar se uma árvore binária é uma árvore binária de busca ou não (vídeo))
|
|
|
|
+ - [ ] [Delete a node from Binary Search Tree (video)](https://www.youtube.com/watch?v=gcULXE7ViZw&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=36) (Deletar um nó de uma Árvore Binária de Busca (vídeo))
|
|
|
|
+ - [ ] [Inorder Successor in a binary search tree (video)](https://www.youtube.com/watch?v=5cPbNCrdotA&index=37&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P) (Sucessor Em-ordem em uma árvore binária de busca (vídeo))
|
|
- [ ] Implementar:
|
|
- [ ] Implementar:
|
|
- - [ ] insert // insert value into tree
|
|
|
|
- - [ ] get_node_count // get count of values stored
|
|
|
|
- - [ ] print_values // prints the values in the tree, from min to max
|
|
|
|
|
|
+ - [ ] insert // insere um valor na árvore
|
|
|
|
+ - [ ] get_node_count // obtém contagem de valores armazenados
|
|
|
|
+ - [ ] print_values // exibe os valores na árvore, do min até o max
|
|
- [ ] delete_tree
|
|
- [ ] delete_tree
|
|
- - [ ] is_in_tree // returns true if given value exists in the tree
|
|
|
|
- - [ ] get_height // returns the height in nodes (single node's height is 1)
|
|
|
|
- - [ ] get_min // returns the minimum value stored in the tree
|
|
|
|
- - [ ] get_max // returns the maximum value stored in the tree
|
|
|
|
|
|
+ - [ ] is_in_tree // retorna "true" se tal valor existir na árvore
|
|
|
|
+ - [ ] get_height // retorna a altura nos nós (altura de nó único é 1)
|
|
|
|
+ - [ ] get_min // retorna o valor mínimo armazenado na árvore
|
|
|
|
+ - [ ] get_max // retorna o valor máximo armazenado na árvore
|
|
- [ ] is_binary_search_tree
|
|
- [ ] is_binary_search_tree
|
|
- [ ] delete_value
|
|
- [ ] delete_value
|
|
- - [ ] get_successor // returns next-highest value in tree after given value, -1 if none
|
|
|
|
-
|
|
|
|
-- ### Heap / Priority Queue / Binary Heap
|
|
|
|
- - visualized as a tree, but is usually linear in storage (array, linked list)
|
|
|
|
- - [ ] [Heap](https://en.wikipedia.org/wiki/Heap_(data_structure))
|
|
|
|
- - [ ] [Introduction (video)](https://www.coursera.org/learn/data-structures/lecture/2OpTs/introduction)
|
|
|
|
- - [ ] [Naive Implementations (video)](https://www.coursera.org/learn/data-structures/lecture/z3l9N/naive-implementations)
|
|
|
|
- - [ ] [Binary Trees (video)](https://www.coursera.org/learn/data-structures/lecture/GRV2q/binary-trees)
|
|
|
|
- - [ ] [Tree Height Remark (video)](https://www.coursera.org/learn/data-structures/supplement/S5xxz/tree-height-remark)
|
|
|
|
- - [ ] [Basic Operations (video)](https://www.coursera.org/learn/data-structures/lecture/0g1dl/basic-operations)
|
|
|
|
- - [ ] [Complete Binary Trees (video)](https://www.coursera.org/learn/data-structures/lecture/gl5Ni/complete-binary-trees)
|
|
|
|
- - [ ] [Pseudocode (video)](https://www.coursera.org/learn/data-structures/lecture/HxQo9/pseudocode)
|
|
|
|
- - [ ] [Heap Sort - jumps to start (video)](https://youtu.be/odNJmw5TOEE?list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&t=3291)
|
|
|
|
- - [ ] [Heap Sort (video)](https://www.coursera.org/learn/data-structures/lecture/hSzMO/heap-sort)
|
|
|
|
- - [ ] [Building a heap (video)](https://www.coursera.org/learn/data-structures/lecture/dwrOS/building-a-heap)
|
|
|
|
- - [ ] [MIT: Heaps and Heap Sort (video)](https://www.youtube.com/watch?v=B7hVxCmfPtM&index=4&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb)
|
|
|
|
- - [ ] [CS 61B Lecture 24: Priority Queues (video)](https://www.youtube.com/watch?v=yIUFT6AKBGE&index=24&list=PL4BBB74C7D2A1049C)
|
|
|
|
- - [ ] [Linear Time BuildHeap (max-heap)](https://www.youtube.com/watch?v=MiyLo8adrWw)
|
|
|
|
- - [ ] Implement a max-heap:
|
|
|
|
|
|
+ - [ ] get_successor // retorna o próximo maior valor na árvore após dado valor, -1 se não houver nenhum
|
|
|
|
+
|
|
|
|
+- ### Memória Dinâmica (heap) / Filas Prioritárias / Memória Dinâmica Binária (heap binary)
|
|
|
|
+ - visualizada como uma árvore, mas geralmente é linear no armazenamento (array, lista ligada)
|
|
|
|
+ - [ ] [Heap](https://en.wikipedia.org/wiki/Heap_(data_structure)) (Memória DInâmica)
|
|
|
|
+ - [ ] [Introduction (video)](https://www.coursera.org/learn/data-structures/lecture/2OpTs/introduction) (Introdução (vídeo))
|
|
|
|
+ - [ ] [Naive Implementations (video)](https://www.coursera.org/learn/data-structures/lecture/z3l9N/naive-implementations) (Implementações Ingênuas (vídeo))
|
|
|
|
+ - [ ] [Binary Trees (video)](https://www.coursera.org/learn/data-structures/lecture/GRV2q/binary-trees) (Árvores Binárias (vídeo))
|
|
|
|
+ - [ ] [Tree Height Remark (video)](https://www.coursera.org/learn/data-structures/supplement/S5xxz/tree-height-remark) (Observações sobre Altura de Árvore (vídeo))
|
|
|
|
+ - [ ] [Basic Operations (video)](https://www.coursera.org/learn/data-structures/lecture/0g1dl/basic-operations) (Operações Básicas (vídeo))
|
|
|
|
+ - [ ] [Complete Binary Trees (video)](https://www.coursera.org/learn/data-structures/lecture/gl5Ni/complete-binary-trees) (Árvores Binárias Completas (vídeo))
|
|
|
|
+ - [ ] [Pseudocode (video)](https://www.coursera.org/learn/data-structures/lecture/HxQo9/pseudocode) (Pseudocódigo (vídeo))
|
|
|
|
+ - [ ] [Heap Sort - jumps to start (video)](https://youtu.be/odNJmw5TOEE?list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&t=3291) (Algoritmo de Ordenação heapsort - pula para o começo (vídeo))
|
|
|
|
+ - [ ] [Heap Sort (video)](https://www.coursera.org/learn/data-structures/lecture/hSzMO/heap-sort) (Algoritmo de Ordenação heapsort (vídeo))
|
|
|
|
+ - [ ] [Building a heap (video)](https://www.coursera.org/learn/data-structures/lecture/dwrOS/building-a-heap) (Construindo uma memória dinâmica (heap) (vídeo))
|
|
|
|
+ - [ ] [MIT: Heaps and Heap Sort (video)](https://www.youtube.com/watch?v=B7hVxCmfPtM&index=4&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb) (MIT: Memórias Dinâmias e heapsort (vídeo))
|
|
|
|
+ - [ ] [CS 61B Lecture 24: Priority Queues (video)](https://www.youtube.com/watch?v=yIUFT6AKBGE&index=24&list=PL4BBB74C7D2A1049C) (CS (Ciência da Computação) 61B Aula 24: Filas Prioritárias (vídeo))
|
|
|
|
+ - [ ] [Linear Time BuildHeap (max-heap)](https://www.youtube.com/watch?v=MiyLo8adrWw) (BuildHeap em Tempo Linear (heap máxima))
|
|
|
|
+ - [ ] Implementar uma heap máxima (max-heap):
|
|
- [ ] insert
|
|
- [ ] insert
|
|
- - [ ] sift_up - needed for insert
|
|
|
|
- - [ ] get_max - returns the max item, without removing it
|
|
|
|
- - [ ] get_size() - return number of elements stored
|
|
|
|
- - [ ] is_empty() - returns true if heap contains no elements
|
|
|
|
- - [ ] extract_max - returns the max item, removing it
|
|
|
|
- - [ ] sift_down - needed for extract_max
|
|
|
|
- - [ ] remove(i) - removes item at index x
|
|
|
|
- - [ ] heapify - create a heap from an array of elements, needed for heap_sort
|
|
|
|
- - [ ] heap_sort() - take an unsorted array and turn it into a sorted array in-place using a max heap
|
|
|
|
- - note: using a min heap instead would save operations, but double the space needed (cannot do in-place).
|
|
|
|
|
|
+ - [ ] sift_up - necessário insert
|
|
|
|
+ - [ ] get_max - retorna o item max (maior item), sem removê-lo
|
|
|
|
+ - [ ] get_size() - retorna o número de elementos armazenados
|
|
|
|
+ - [ ] is_empty() - retorna "true" se o heap não contém elementos
|
|
|
|
+ - [ ] extract_max - retorna o item max (maior item), removendo ele
|
|
|
|
+ - [ ] sift_down - necessário para extract_max
|
|
|
|
+ - [ ] remove(i) - remove o item no índice x
|
|
|
|
+ - [ ] heapify - cria um heap a partir de um array de elementos, necessário para heap_sort
|
|
|
|
+ - [ ] heap_sort() - pega um array não-ordenado e o transforma em um array ordenado "in-place" (sem gerar um novo array) usando uma heap máxima (max-heap)
|
|
|
|
+ - nota: usando uma heap mínima (min-heap) ao invés de uma heap máxima (max-heap) poderia salvar operações, mas duplicar o espaço necessário (não é possível fazer "in-place")
|
|
|
|
|
|
## Sorting
|
|
## Sorting
|
|
|
|
|