SYMBOL INDEX (611 symbols across 110 files) FILE: analysis/anagrams-linear-solution.py function anagrams (line 3) | def anagrams(string1: str, string2: str) -> bool: function count_characters (line 23) | def count_characters(string: str, arr: list): FILE: analysis/anagrams-loglinear-solution.py function anagrams (line 3) | def anagrams(string1: str, string2: str) -> bool: FILE: analysis/anagrams-quadratic-solution.py function anagrams (line 3) | def anagrams(string1: str, string2: str) -> bool: FILE: analysis/time-iterative-approach.py function sum_nums (line 4) | def sum_nums(n: int) -> int: FILE: analysis/time-noniterative-approach.py function sum_nums (line 4) | def sum_nums(n: int) -> int: FILE: deque/circular-deque.py class Deque (line 5) | class Deque: method __init__ (line 7) | def __init__(self, capacity: int = 10) -> None: method is_empty (line 14) | def is_empty(self) -> bool: method is_full (line 17) | def is_full(self) -> bool: method size (line 20) | def size(self) -> int: method add_front (line 23) | def add_front(self, item: Any): method add_rear (line 35) | def add_rear(self, item: Any): method remove_front (line 45) | def remove_front(self) -> Any: method remove_rear (line 56) | def remove_rear(self) -> Any: method get_front (line 69) | def get_front(self) -> Any: method get_rear (line 74) | def get_rear(self) -> Any: function is_palindrome (line 80) | def is_palindrome(string:str='') -> bool: FILE: deque/deque.py class Deque (line 5) | class Deque: method __init__ (line 7) | def __init__(self) -> None: method is_empty (line 10) | def is_empty(self) -> bool: method size (line 13) | def size(self) -> int: method add_front (line 16) | def add_front(self, item: Any): method add_rear (line 19) | def add_rear(self, item: Any): method remove_front (line 22) | def remove_front(self) -> Any: method remove_rear (line 27) | def remove_rear(self) -> Any: function is_palindrome (line 34) | def is_palindrome(string:str='') -> bool: FILE: deque/deque_linked_list_impl.py class ListNode (line 6) | class ListNode: method __init__ (line 8) | def __init__(self, key:Any = None, prev:'ListNode' = None, next:'ListN... class Deque (line 14) | class Deque: method __init__ (line 16) | def __init__(self): method size (line 22) | def size(self) -> int: method is_empty (line 26) | def is_empty(self) -> bool: method add_front (line 30) | def add_front(self, e:Any) -> None: method add_rear (line 39) | def add_rear(self, e:Any) -> None: method remove_front (line 48) | def remove_front(self) -> Any: method remove_rear (line 61) | def remove_rear(self) -> Any: method get_front (line 74) | def get_front(self) -> Any: method remove_rear (line 80) | def remove_rear(self) -> Any: FILE: graphs/bellman-ford-negative-weight-cycle/graph.py class Graph (line 10) | class Graph: method __init__ (line 11) | def __init__(self): method add_vertex (line 17) | def add_vertex(self, label: str): method add_edge (line 22) | def add_edge(self, label1: str, label2: str, weight: int): method bellman_ford (line 25) | def bellman_ford(self, source: str): method print_distances (line 58) | def print_distances(self, source: str): FILE: graphs/bellman-ford/graph.py class Graph (line 10) | class Graph: method __init__ (line 13) | def __init__(self) -> None: method add_vertex (line 20) | def add_vertex(self, label:str) -> None: method add_edge (line 26) | def add_edge(self, v1:str, v2:str, distance:int) -> None: method bellman_ford (line 30) | def bellman_ford(self, label:str) -> None: method _print_paths (line 50) | def _print_paths(self, label:str) -> None: method _return_path (line 60) | def _return_path(self, label:str) -> str: FILE: graphs/breadth-first-search/graph.py class Graph (line 4) | class Graph: method __init__ (line 5) | def __init__(self): method add_vertex (line 12) | def add_vertex(self, label: str): method add_edge (line 19) | def add_edge(self, label1: str, label2: str): method bfs (line 23) | def bfs(self, label: str): method return_path (line 37) | def return_path(self, label: str) -> str: FILE: graphs/breadth-first-search/queue.py class Queue (line 1) | class Queue: method __init__ (line 2) | def __init__(self): method enqueue (line 5) | def enqueue(self, item): method dequeue (line 8) | def dequeue(self): method size (line 11) | def size(self): method is_empty (line 14) | def is_empty(self): FILE: graphs/cycle-detection/cycle-directed-graph/graph.py class Graph (line 2) | class Graph: method __init__ (line 3) | def __init__(self): method add_vertex (line 13) | def add_vertex(self, label: str): method add_edge (line 20) | def add_edge(self, label1: str, label2: str): method dfs (line 23) | def dfs(self, label: str): method return_path (line 38) | def return_path(self, label: str) -> str: FILE: graphs/cycle-detection/cycle-undirected-graph/graph.py class Graph (line 2) | class Graph: method __init__ (line 3) | def __init__(self): method add_vertex (line 13) | def add_vertex(self, label: str): method add_edge (line 20) | def add_edge(self, label1: str, label2: str): method dfs (line 24) | def dfs(self, label: str): method return_path (line 39) | def return_path(self, label: str) -> str: FILE: graphs/depth-first-search/depth-first-search-recursive/graph.py class Graph (line 2) | class Graph: method __init__ (line 3) | def __init__(self): method add_vertex (line 13) | def add_vertex(self, label: str): method add_edge (line 20) | def add_edge(self, label1: str, label2: str): method dfs (line 24) | def dfs(self, label: str): method return_path (line 37) | def return_path(self, label: str) -> str: FILE: graphs/depth-first-search/depth-first-search/graph.py class Graph (line 4) | class Graph: method __init__ (line 5) | def __init__(self): method add_vertex (line 15) | def add_vertex(self, label: str): method add_edge (line 22) | def add_edge(self, label1: str, label2: str): method dfs (line 26) | def dfs(self, label: str): method return_path (line 48) | def return_path(self, label: str) -> str: method find_unvisited_neighbour (line 54) | def find_unvisited_neighbour(self, tmp) -> str: FILE: graphs/depth-first-search/depth-first-search/stack.py class Stack (line 1) | class Stack: method __init__ (line 2) | def __init__(self): method is_empty (line 5) | def is_empty(self): method push (line 8) | def push(self, item): method pop (line 11) | def pop(self): method peek (line 14) | def peek(self): method size (line 17) | def size(self): FILE: graphs/dijkstra/adjacency-list-impl/main.py class Graph (line 7) | class Graph: method __init__ (line 9) | def __init__(self, capacity :int =10): method add_vertex (line 18) | def add_vertex(self, label :str, weight :int = float('inf')) -> None: method add_edge (line 25) | def add_edge(self, label1 :str, label2 :str, weight :int) -> None: method dijkstra (line 30) | def dijkstra(self, label :str) -> None: method show_path (line 44) | def show_path(self, label :str) -> str: method _find_cheapest_vertex (line 50) | def _find_cheapest_vertex(self) -> Vertex: FILE: graphs/dijkstra/adjacency-list-impl/vertex.py class Vertex (line 3) | class Vertex: method __init__ (line 5) | def __init__(self, label :str, weight :int = float('inf')): FILE: graphs/dijkstra/matrix-impl/graph.py class Graph (line 4) | class Graph: method __init__ (line 5) | def __init__(self, size: int = 10): method add_vertex (line 14) | def add_vertex(self, label: str): method add_edge (line 24) | def add_edge(self, label1: str, label2: str, weight: int): method dijkstra (line 29) | def dijkstra(self, label: str): method return_path (line 43) | def return_path(self, label: str) -> str: method find_minimum_weight_vertex (line 49) | def find_minimum_weight_vertex(self): FILE: graphs/dijkstra/matrix-impl/vertex.py class Vertex (line 1) | class Vertex: method __init__ (line 2) | def __init__(self, label: str = None, weight: int = float("inf"), ind... FILE: graphs/dijkstra/priority-queue-impl-adjacency-map/graph.py class Graph (line 5) | class Graph: method __init__ (line 6) | def __init__(self): method add_vertex (line 11) | def add_vertex(self, label: str): method add_edge (line 17) | def add_edge(self, label1: str, label2: str, weight: int): method dijkstra (line 20) | def dijkstra(self, label: str): method show_path (line 34) | def show_path(self, label: str) -> str: FILE: graphs/dijkstra/priority-queue-impl-adjacency-map/priorityqueue.py class PriorityQueue (line 4) | class PriorityQueue: method __init__ (line 5) | def __init__(self): method is_empty (line 9) | def is_empty(self) -> bool: method insert (line 12) | def insert(self, vertex: Vertex): method _perc_up (line 18) | def _perc_up(self, pointer: int): method decrease_key (line 26) | def decrease_key(self, pointer: int): method delete_min (line 29) | def delete_min(self) -> Vertex: method _perc_down (line 40) | def _perc_down(self, pointer: int): method _find_swap_index (line 49) | def _find_swap_index(self, pointer: int) -> int: FILE: graphs/dijkstra/priority-queue-impl-adjacency-map/vertex.py class Vertex (line 1) | class Vertex: method __init__ (line 2) | def __init__(self, label: str = None, weight: int = float("inf"), key:... FILE: graphs/is-graph-bipartite/graph.py class Graph (line 4) | class Graph: method __init__ (line 5) | def __init__(self): method add_vertex (line 10) | def add_vertex(self, label: str = None): method add_edge (line 15) | def add_edge(self, label1: str = None, label2: str = None): method bipartite_check (line 19) | def bipartite_check(self) -> bool: FILE: graphs/is-graph-bipartite/queue.py class Queue (line 1) | class Queue: method __init__ (line 2) | def __init__(self): method is_empty (line 5) | def is_empty(self) -> bool: method enqueue (line 8) | def enqueue(self, vertex: str): method dequeue (line 11) | def dequeue(self): FILE: graphs/kosarajus-algorithm/graph.py class Graph (line 7) | class Graph: method __init__ (line 10) | def __init__(self) -> None: method add_vertex (line 18) | def add_vertex(self, label:str) -> None: method add_edge (line 24) | def add_edge(self, label1:str, label2:str) -> None: method kosaraju (line 31) | def kosaraju(self) -> List[List[str]]: method _dfs (line 53) | def _dfs(self, label:str) -> None: method _dfs_reversed (line 63) | def _dfs_reversed(self, v:str, connected:List[str]) -> None: FILE: graphs/kosarajus-algorithm/stack.py class Stack (line 1) | class Stack: method __init__ (line 2) | def __init__(self): method is_empty (line 5) | def is_empty(self) -> bool: method push (line 8) | def push(self, item): method pop (line 11) | def pop(self): method peek (line 16) | def peek(self): method size (line 22) | def size(self) -> int: FILE: graphs/minimum-spanning-tree/breadth-first-search/graph.py class Graph (line 4) | class Graph: method __init__ (line 5) | def __init__(self): method add_vertex (line 12) | def add_vertex(self, label: str): method add_edge (line 19) | def add_edge(self, label1: str, label2: str): method minimum_spanning_tree (line 23) | def minimum_spanning_tree(self, label: str) -> list: # this is breadt... method return_path (line 40) | def return_path(self, label: str) -> str: FILE: graphs/minimum-spanning-tree/breadth-first-search/queue.py class Queue (line 1) | class Queue: method __init__ (line 2) | def __init__(self): method enqueue (line 5) | def enqueue(self, item): method dequeue (line 8) | def dequeue(self): method size (line 11) | def size(self): method is_empty (line 14) | def is_empty(self): FILE: graphs/minimum-spanning-tree/kruskals-algorithm/graph.py class Graph (line 4) | class Graph: method __init__ (line 7) | def __init__(self) -> None: method add_vertex (line 15) | def add_vertex(self, label:str) -> None: method add_edge (line 21) | def add_edge(self, label1:str, label2:str, weight:int) -> None: method kruskal (line 27) | def kruskal(self) -> List[Tuple[str, str, int]]: method _find_root (line 47) | def _find_root(self, label:str) -> str: FILE: graphs/minimum-spanning-tree/prims-algorithm/graph.py class Graph (line 7) | class Graph: method __init__ (line 9) | def __init__(self) -> None: method add_vertex (line 15) | def add_vertex(self, label:str, weight:int=float('inf')): method add_edge (line 21) | def add_edge(self, label1:str, label2:str, weight:int): method prims (line 26) | def prims(self, label:str): FILE: graphs/minimum-spanning-tree/prims-algorithm/priorityqueue.py class PriorityQueue (line 6) | class PriorityQueue: method __init__ (line 9) | def __init__(self) -> None: method is_empty (line 14) | def is_empty(self) -> bool: method insert (line 18) | def insert(self, v:Vertex): method perc_up (line 25) | def perc_up(self, index:int): method decrease_key (line 34) | def decrease_key(self, key:int): method get_min (line 38) | def get_min(self) -> Vertex: method delete_min (line 44) | def delete_min(self) -> Vertex: method perc_down (line 56) | def perc_down(self, index:int): method find_min_index (line 67) | def find_min_index(self, index:int) -> int: FILE: graphs/minimum-spanning-tree/prims-algorithm/vertex.py class Vertex (line 1) | class Vertex: method __init__ (line 3) | def __init__(self, label:str=None, weight:int=float('inf'), index:int=... FILE: graphs/topological-sorting/graph.py class Graph (line 1) | class Graph: method __init__ (line 2) | def __init__(self): method add_vertex (line 14) | def add_vertex(self, label: str): method add_edge (line 22) | def add_edge(self, label1: str, label2: str): method topsort (line 27) | def topsort(self): method dfs (line 34) | def dfs(self, start: str): method show_path (line 48) | def show_path(self, label: str) -> str: FILE: graphs/union-find/number-of-connected-components/graph.py function find_parent (line 3) | def find_parent(i: int, components: List[int]) -> int: class Graph (line 10) | class Graph: method number_of_connected_components (line 11) | def number_of_connected_components(self, edges_matrix: List[List[int]]... FILE: graphs/union-find/union-find-path-compression/graph.py class Graph (line 4) | class Graph: method __init__ (line 6) | def __init__(self): method add_vertex (line 10) | def add_vertex(self, label: str = None): method add_edge (line 13) | def add_edge(self, label1: str, label2: str): method union_find (line 16) | def union_find(self): method find_root (line 35) | def find_root(self, vertex: Vertex): FILE: graphs/union-find/union-find-path-compression/vertex.py class Vertex (line 1) | class Vertex: method __init__ (line 3) | def __init__(self, label: str = None): FILE: hash-table/chaining.py class KeyValue (line 5) | class KeyValue: method __init__ (line 7) | def __init__(self, key: int, value: Any) -> None: class HashTable (line 12) | class HashTable: method __init__ (line 15) | def __init__(self, capacity:int = 11) -> None: method put (line 21) | def put(self, key: int, value: Any) -> int: method get (line 42) | def get(self, key: int) -> Any: method contains (line 61) | def contains(self, key: int) -> bool: method delete (line 80) | def delete(self, key: int) -> None: method hash (line 102) | def hash(self, key: int) -> int: method size (line 106) | def size(self) -> int: FILE: hash-table/linear-probing.py class HashTable (line 6) | class HashTable: method __init__ (line 8) | def __init__(self, capacity:int = 11) -> None: method put (line 15) | def put(self, key:int, value:Any): method contains (line 35) | def contains(self, key:int) -> bool: method get (line 40) | def get(self, key:int) -> Any: method delete (line 47) | def delete(self, key:int): method find (line 56) | def find(self, key:int) -> Tuple[int, bool]: method size (line 72) | def size(self) -> int: method hash (line 75) | def hash(self, key:int) -> int: method rehash (line 79) | def rehash(self, old_hash:int) -> int: FILE: linked-lists/circular-doubly-linked-list/list.py class List (line 4) | class List: method __init__ (line 5) | def __init__(self): method is_empty (line 9) | def is_empty(self) -> bool: method print_all (line 12) | def print_all(self): method number_of_elements (line 24) | def number_of_elements(self) -> int: method add_to_head (line 37) | def add_to_head(self, key: int): method add_to_tail (line 47) | def add_to_tail(self, key: int): method delete_from_head (line 57) | def delete_from_head(self) -> int: method delete_from_tail (line 70) | def delete_from_tail(self) -> int: method delete_nodes_with_value (line 83) | def delete_nodes_with_value(self, key: int): method delete_on_index (line 100) | def delete_on_index(self, index: int): method insert_after (line 119) | def insert_after(self, list_element: int, new_element: int): method insert_before (line 137) | def insert_before(self, list_element: int, new_element: int): method sort (line 154) | def sort(self): FILE: linked-lists/circular-doubly-linked-list/node.py class Node (line 1) | class Node: method __init__ (line 2) | def __init__(self, key: int=None, prev=None, next=None): FILE: linked-lists/circular-singly-linked-list/list.py class List (line 4) | class List: method __init__ (line 5) | def __init__(self): method is_empty (line 9) | def is_empty(self) -> bool: method print_all (line 12) | def print_all(self): method number_of_elements (line 24) | def number_of_elements(self) -> int: method add_to_head (line 37) | def add_to_head(self, key: int): method add_to_tail (line 45) | def add_to_tail(self, key: int): method delete_from_head (line 53) | def delete_from_head(self) -> int: method delete_from_tail (line 65) | def delete_from_tail(self) -> int: method delete_nodes_with_value (line 80) | def delete_nodes_with_value(self, key: int): method delete_on_index (line 96) | def delete_on_index(self, index: int): method insert_after (line 116) | def insert_after(self, list_element: int, new_element: int): method insert_before (line 132) | def insert_before(self, list_element: int, new_element: int): method sort (line 149) | def sort(self): FILE: linked-lists/circular-singly-linked-list/node.py class Node (line 1) | class Node: method __init__ (line 2) | def __init__(self, key: int=None, next=None): FILE: linked-lists/doubly-linked-list/list.py class List (line 4) | class List: method __init__ (line 5) | def __init__(self): method is_empty (line 9) | def is_empty(self) -> bool: method print_all (line 12) | def print_all(self): method number_of_elements (line 19) | def number_of_elements(self) -> int: method add_to_head (line 27) | def add_to_head(self, key: int): method add_to_tail (line 34) | def add_to_tail(self, key: int): method delete_from_head (line 41) | def delete_from_head(self) -> int: method delete_from_tail (line 53) | def delete_from_tail(self) -> int: method delete_nodes_with_value (line 65) | def delete_nodes_with_value(self, key: int): method delete_on_index (line 83) | def delete_on_index(self, index: int): method insert_after (line 102) | def insert_after(self, list_element: int, new_element: int): method insert_before (line 115) | def insert_before(self, list_element: int, new_element: int): method sort (line 127) | def sort(self): FILE: linked-lists/doubly-linked-list/node.py class Node (line 1) | class Node: method __init__ (line 2) | def __init__(self, key: int=None, prev=None, next=None): FILE: linked-lists/singly-linked-list/list.py class List (line 4) | class List: method __init__ (line 5) | def __init__(self): method is_empty (line 9) | def is_empty(self) -> bool: method print_all (line 12) | def print_all(self): method number_of_elements (line 19) | def number_of_elements(self) -> int: method add_to_head (line 27) | def add_to_head(self, key: int): method add_to_tail (line 33) | def add_to_tail(self, key: int): method delete_from_head (line 40) | def delete_from_head(self) -> int: method delete_from_tail (line 51) | def delete_from_tail(self) -> int: method delete_nodes_with_value (line 66) | def delete_nodes_with_value(self, key: int): method delete_on_index (line 82) | def delete_on_index(self, index: int): method insert_after (line 102) | def insert_after(self, list_element: int, new_element: int): method insert_before (line 113) | def insert_before(self, list_element: int, new_element: int): method sort (line 125) | def sort(self): FILE: linked-lists/singly-linked-list/node.py class Node (line 1) | class Node: method __init__ (line 2) | def __init__(self, key: int=None, next=None): FILE: queue/circular-queue-fixed-size-array-impl.py class Queue (line 1) | class Queue: method __init__ (line 2) | def __init__(self, length: int = 10): method enqueue (line 8) | def enqueue(self, item): method dequeue (line 17) | def dequeue(self): method peek (line 28) | def peek(self): method size (line 33) | def size(self) -> int: method is_empty (line 36) | def is_empty(self) -> bool: method is_full (line 39) | def is_full(self) -> bool: function hot_potato (line 43) | def hot_potato(namelist, number): FILE: queue/queue-array-impl.py class Queue (line 1) | class Queue: method __init__ (line 2) | def __init__(self): method enqueue (line 5) | def enqueue(self, item): method dequeue (line 8) | def dequeue(self): method peek (line 13) | def peek(self): method size (line 18) | def size(self) -> int: method is_empty (line 21) | def is_empty(self) -> bool: function hot_potato (line 25) | def hot_potato(namelist, number): FILE: queue/queue-fixed-size-array-impl.py class Queue (line 1) | class Queue: method __init__ (line 2) | def __init__(self, length: int = 10): method enqueue (line 8) | def enqueue(self, item): method dequeue (line 17) | def dequeue(self): method peek (line 28) | def peek(self): method size (line 33) | def size(self) -> int: method is_empty (line 36) | def is_empty(self) -> bool: method is_full (line 39) | def is_full(self) -> bool: function hot_potato (line 43) | def hot_potato(namelist, number): FILE: queue/queue-linked-list-impl.py class Node (line 2) | class Node: method __init__ (line 3) | def __init__(self, key, next=None): class Queue (line 8) | class Queue: method __init__ (line 9) | def __init__(self): method enqueue (line 13) | def enqueue(self, item): method dequeue (line 21) | def dequeue(self): method peek (line 32) | def peek(self): method size (line 37) | def size(self) -> int: method is_empty (line 40) | def is_empty(self) -> bool: function hot_potato (line 44) | def hot_potato(namelist, number): FILE: queue/queue-two-stacks-impl.py class Stack (line 1) | class Stack: method __init__ (line 2) | def __init__(self): method is_empty (line 5) | def is_empty(self): method push (line 8) | def push(self, item): method pop (line 11) | def pop(self): method peek (line 14) | def peek(self): method size (line 17) | def size(self): class Queue (line 21) | class Queue: method __init__ (line 22) | def __init__(self): method is_empty (line 26) | def is_empty(self) -> bool: method size (line 29) | def size(self) -> int: method enqueue (line 32) | def enqueue(self, item): method dequeue (line 35) | def dequeue(self): method peek (line 45) | def peek(self): function hot_potato (line 57) | def hot_potato(people: list, num: int) -> str: FILE: recursion/convert-number-iterative.py function converter (line 4) | def converter(num: int, base: int) -> str: FILE: recursion/convert-number.py function converter (line 1) | def converter(num: int, base: int) -> str: FILE: recursion/factorial.py function factorial_rec (line 1) | def factorial_rec(n: int) -> int: function factorial_it (line 8) | def factorial_it(n: int) -> int: FILE: recursion/fibonacci-iterative.py function fibonacci (line 1) | def fibonacci(n: int) -> int: FILE: recursion/fibonacci-memoization.py function fibonacci (line 5) | def fibonacci(n: int) -> int: FILE: recursion/fibonacci-recursive-worst-solution.py function fibonacci (line 1) | def fibonacci(n: int) -> int: FILE: recursion/fibonacci-recursive.py function fibonacci (line 1) | def fibonacci(n: int) -> int: FILE: recursion/fibonacci-sum-iterative.py function fibonaci (line 1) | def fibonaci(n: int): FILE: recursion/fibonacci-sum-recursive.py function fibonacci (line 1) | def fibonacci(n: int) -> int: FILE: recursion/maze.py class Stack (line 4) | class Stack: method __init__ (line 6) | def __init__(self) -> None: method is_empty (line 10) | def is_empty(self) -> bool: method size (line 14) | def size(self) -> int: method push (line 18) | def push(self, item:Any) -> None: method peek (line 22) | def peek(self) -> Any: method pop (line 28) | def pop(self) -> Any: function path_finder (line 57) | def path_finder(matrix:List[List[int]], stack:Stack) -> None: function _move (line 61) | def _move(matrix:List[List[int]], stack:Stack) -> None: function _add_coordinates_to_stack (line 86) | def _add_coordinates_to_stack(matrix:List[List[int]], stack:Stack, x:int... FILE: recursion/palindrome.py function palindrome_checker (line 1) | def palindrome_checker(string: str) -> bool: function palindrome_checker_iterative (line 22) | def palindrome_checker_iterative(string:str) -> bool: function palindrome_checker_slicing (line 40) | def palindrome_checker_slicing(string: str) -> bool: FILE: recursion/reverse-linked-list-iterative-stack.py class ListNode (line 3) | class ListNode: method __init__ (line 4) | def __init__(self, payload = None, next: 'ListNode' = None) -> None: function reverse_list (line 10) | def reverse_list(head: ListNode) -> ListNode: FILE: recursion/reverse-linked-list-iterative.py class ListNode (line 1) | class ListNode: method __init__ (line 2) | def __init__(self, val=0, next=None): function reverse_list (line 7) | def reverse_list(head: ListNode) -> ListNode: FILE: recursion/reverse-linked-list.py class ListNode (line 1) | class ListNode: method __init__ (line 2) | def __init__(self, val: int = None, next = None): function reverse_linked_list (line 7) | def reverse_linked_list(node: ListNode) -> ListNode: FILE: recursion/reverse-list.py function reverse_rec (line 4) | def reverse_rec(elements: list): function reverse_iterative (line 19) | def reverse_iterative(elements: list): FILE: recursion/reverse-string.py function reverse_string (line 5) | def reverse_string(string: str) -> str: function reverse_string_ex_one (line 19) | def reverse_string_ex_one(string: str) -> str: function reverse_string_ex_two (line 29) | def reverse_string_ex_two(string: str) -> str: FILE: recursion/stack.py class Stack (line 1) | class Stack: method __init__ (line 3) | def __init__(self): method is_empty (line 6) | def is_empty(self): method push (line 9) | def push(self, item): method pop (line 12) | def pop(self): method peek (line 15) | def peek(self): method size (line 18) | def size(self): FILE: recursion/sum-numbers-binary-recursion.py function sum_numbers (line 5) | def sum_numbers(nums: list) -> int: FILE: recursion/sum-numbers-pointer.py function sum_numbers (line 5) | def sum_numbers(nums: list) -> int: FILE: recursion/sum-numbers-slicing.py function sum_numbers (line 5) | def sum_numbers(nums: list) -> int: FILE: recursion/towers-of-hanoi.py function print_move (line 1) | def print_move(start: str, end: str): function towers (line 5) | def towers(number: int, start: str, spare: str, end: str): FILE: searching/binary-search-iterative.py function binary_search (line 2) | def binary_search(nums: list, target: int) -> bool: FILE: searching/binary-search-recursive-pointers.py function binary_search (line 2) | def binary_search(nums: list, target: int) -> bool: FILE: searching/binary-search-recursive.py function binary_search (line 3) | def binary_search(nums: list, target: int) -> bool: FILE: searching/sequential-search-ordered-list.py function sequential_search (line 2) | def sequential_search(nums: list, target: int) -> bool: FILE: searching/sequential-search-unordered-list.py function sequential_search (line 2) | def sequential_search(nums: list, target: int) -> bool: FILE: sorting/bubble-sort.py function bubble_sort (line 5) | def bubble_sort(nums: list): FILE: sorting/insertion-sort.py function insertion_sort (line 5) | def insertion_sort(nums: list): FILE: sorting/merge-sort.py function merge_sort (line 5) | def merge_sort(nums: list): FILE: sorting/quicksort-return-new-array.py function quick_sort (line 4) | def quick_sort(nums: list) -> list: FILE: sorting/quicksort.py function quick_sort (line 4) | def quick_sort(nums: list, i: int, j: int): FILE: sorting/selection-sort.py function selection_sort (line 5) | def selection_sort(nums: list): FILE: sorting/short-bubble.py function short_bubble (line 5) | def short_bubble(nums: list): FILE: stack/examples/balanced-brackets.py function balanced_brackets (line 4) | def balanced_brackets(string: str) -> bool: FILE: stack/examples/number_converter.py function base_converter (line 4) | def base_converter(num, base) -> str: FILE: stack/examples/stack.py class Stack (line 1) | class Stack: method __init__ (line 2) | def __init__(self): method is_empty (line 5) | def is_empty(self) -> bool: method push (line 8) | def push(self, item): method pop (line 11) | def pop(self): method peek (line 16) | def peek(self): method size (line 22) | def size(self) -> int: FILE: stack/stack-array-impl-less-efficient.py class Stack (line 4) | class Stack: method __init__ (line 5) | def __init__(self): method is_empty (line 8) | def is_empty(self) -> bool: method push (line 11) | def push(self, item): method pop (line 14) | def pop(self): method peek (line 19) | def peek(self): method size (line 24) | def size(self) -> int: function reverse_string (line 28) | def reverse_string(s: str) -> str: FILE: stack/stack-array-impl.py class Stack (line 1) | class Stack: method __init__ (line 2) | def __init__(self): method is_empty (line 5) | def is_empty(self) -> bool: method push (line 8) | def push(self, item): method pop (line 11) | def pop(self): method peek (line 16) | def peek(self): method size (line 22) | def size(self) -> int: function reverse_string (line 26) | def reverse_string(s: str) -> str: FILE: stack/stack-fixed-size-array-impl.py class Stack (line 4) | class Stack: method __init__ (line 6) | def __init__(self, capacity: int = 1) -> None: method size (line 11) | def size(self) -> int: method is_empty (line 14) | def is_empty(self) -> bool: method is_full (line 17) | def is_full(self) -> bool: method push (line 20) | def push(self, item:Any): method pop (line 26) | def pop(self) -> Any: method peek (line 33) | def peek(self) -> Any: function reverse_string (line 39) | def reverse_string(s: str) -> str: FILE: stack/stack-linked-list-impl.py class Node (line 1) | class Node: method __init__ (line 2) | def __init__(self, key=None, next=None): class Stack (line 7) | class Stack: method __init__ (line 8) | def __init__(self): method is_empty (line 12) | def is_empty(self) -> bool: method push (line 15) | def push(self, item): method pop (line 19) | def pop(self): method peek (line 27) | def peek(self): method size (line 32) | def size(self) -> int: function reverse_string (line 36) | def reverse_string(s: str) -> str: FILE: stack/stack_two_queues.py class Queue (line 1) | class Queue: method __init__ (line 2) | def __init__(self): method enqueue (line 5) | def enqueue(self, item): method dequeue (line 8) | def dequeue(self): method size (line 13) | def size(self) -> int: method is_empty (line 16) | def is_empty(self) -> bool: method peek (line 19) | def peek(self) -> int: class MyStack (line 24) | class MyStack: method __init__ (line 26) | def __init__(self): method empty (line 30) | def empty(self) -> bool: method push (line 33) | def push(self, item): method pop (line 36) | def pop(self): method top (line 48) | def top(self): method size (line 61) | def size(self) -> int: FILE: stack_two_queues.py class Queue (line 4) | class Queue: method __init__ (line 6) | def __init__(self) -> None: method size (line 9) | def size(self) -> int: method is_empty (line 12) | def is_empty(self) -> bool: method enqueue (line 15) | def enqueue(self, item:Any) -> None: method dequeue (line 18) | def dequeue(self) -> Any: class Stack (line 25) | class Stack: method __init__ (line 27) | def __init__(self): method push (line 32) | def push(self, x: Any) -> None: method pop (line 36) | def pop(self) -> Any: method peek (line 51) | def peek(self) -> Any: method is_empty (line 66) | def is_empty(self) -> bool: FILE: substring-search/brute_force.py function search (line 6) | def search(text: str, pattern: str) -> int: FILE: trees/avl-tree.py class TreeNode (line 1) | class TreeNode: method __init__ (line 2) | def __init__(self, key=None, value=None, parent=None, left=None, right... method has_left_child (line 13) | def has_left_child(self) -> bool: method has_right_child (line 16) | def has_right_child(self) -> bool: method has_both_children (line 19) | def has_both_children(self) -> bool: method is_leaf (line 22) | def is_leaf(self) -> bool: method is_root (line 25) | def is_root(self) -> bool: method has_parent (line 28) | def has_parent(self) -> bool: method is_left_child (line 31) | def is_left_child(self) -> bool: method is_right_child (line 34) | def is_right_child(self) -> bool: method find_min (line 37) | def find_min(self): method find_max (line 45) | def find_max(self): class AVLTree (line 54) | class AVLTree: method __init__ (line 55) | def __init__(self): method size (line 59) | def size(self) -> int: method is_empty (line 62) | def is_empty(self) -> bool: method put (line 65) | def put(self, key, value): method _put (line 72) | def _put(self, root: TreeNode, key, value): method get (line 90) | def get(self, key) -> TreeNode: method _get (line 96) | def _get(self, root: TreeNode, key) -> TreeNode: method contains (line 110) | def contains(self, key) -> bool: method delete (line 124) | def delete(self, key): method find_min (line 182) | def find_min(self) -> TreeNode: method find_max (line 190) | def find_max(self) -> TreeNode: method _update_balance_factor (line 198) | def _update_balance_factor(self, root: TreeNode): method _rebalance (line 215) | def _rebalance(self, root: TreeNode): method _rotate_left (line 227) | def _rotate_left(self, root: TreeNode): method _rotate_right (line 245) | def _rotate_right(self, root: TreeNode): FILE: trees/binary-heap.py class BinaryHeap (line 3) | class BinaryHeap: method __init__ (line 4) | def __init__(self): method is_empty (line 8) | def is_empty(self) -> bool: method insert (line 11) | def insert(self, item): method perc_up (line 16) | def perc_up(self, index: int): method get_min (line 22) | def get_min(self): method delete_min (line 27) | def delete_min(self): method perc_down (line 37) | def perc_down(self, index: int): method find_swap_index (line 44) | def find_swap_index(self, index: int) -> int: method build_heap (line 53) | def build_heap(self, nums: list): FILE: trees/binary-search-tree.py class TreeNode (line 1) | class TreeNode: method __init__ (line 2) | def __init__(self, key=None, value=None, parent=None, left=None, right... method has_left_child (line 9) | def has_left_child(self) -> bool: method has_right_child (line 12) | def has_right_child(self) -> bool: method has_both_children (line 15) | def has_both_children(self) -> bool: method is_leaf (line 18) | def is_leaf(self) -> bool: method is_root (line 21) | def is_root(self) -> bool: method has_parent (line 24) | def has_parent(self) -> bool: method is_left_child (line 27) | def is_left_child(self) -> bool: method is_right_child (line 32) | def is_right_child(self) -> bool: method find_min (line 37) | def find_min(self): method find_max (line 45) | def find_max(self): class BinarySearchTree (line 54) | class BinarySearchTree: method __init__ (line 55) | def __init__(self): method size (line 59) | def size(self) -> int: method is_empty (line 62) | def is_empty(self) -> bool: method put (line 65) | def put(self, key, value): method _put (line 72) | def _put(self, root: TreeNode, key, value): method get (line 88) | def get(self, key) -> TreeNode: method _get (line 94) | def _get(self, root: TreeNode, key) -> TreeNode: method contains (line 108) | def contains(self, key) -> bool: method delete (line 122) | def delete(self, key): method find_min (line 173) | def find_min(self) -> TreeNode: method find_max (line 181) | def find_max(self) -> TreeNode: FILE: trees/class-representation.py class TreeNode (line 1) | class TreeNode: method __init__ (line 2) | def __init__(self, key=None, left=None, right=None): method insert_root_value (line 7) | def insert_root_value(self, key=None): method insert_left (line 10) | def insert_left(self, key=None): method insert_right (line 13) | def insert_right(self, key=None): method get_root_value (line 16) | def get_root_value(self): method get_left_child (line 19) | def get_left_child(self): method get_right_child (line 22) | def get_right_child(self): function build_tree (line 35) | def build_tree() -> TreeNode: function print_tree (line 50) | def print_tree(tree: TreeNode): FILE: trees/list-representation.py function create_tree (line 2) | def create_tree(root=None) -> list: function insert_root (line 6) | def insert_root(tree: list, root=None): function insert_left (line 10) | def insert_left(tree: list, root=None): function insert_right (line 15) | def insert_right(tree: list, root=None): function get_root (line 20) | def get_root(tree: list): function get_left_child (line 24) | def get_left_child(tree: list) -> list: function get_right_child (line 28) | def get_right_child(tree: list) -> list: function build_tree (line 41) | def build_tree() -> list: FILE: trees/parse-tree.py class TreeNode (line 7) | class TreeNode: method __init__ (line 8) | def __init__(self, key=None, left=None, right=None): method insert_root_value (line 13) | def insert_root_value(self, key=None): method insert_left (line 16) | def insert_left(self, key=None): method insert_right (line 19) | def insert_right(self, key=None): method get_root_value (line 22) | def get_root_value(self): method get_left_child (line 25) | def get_left_child(self): method get_right_child (line 28) | def get_right_child(self): function tree_parser (line 39) | def tree_parser(s: str) -> TreeNode: function evaluate (line 68) | def evaluate(node: TreeNode) -> int: FILE: trees/stack.py class Stack (line 1) | class Stack: method __init__ (line 2) | def __init__(self): method is_empty (line 5) | def is_empty(self): method push (line 8) | def push(self, item): method pop (line 11) | def pop(self): method peek (line 14) | def peek(self): method size (line 17) | def size(self): FILE: trees/tree-traversal/functions.py function inorder (line 21) | def inorder(tree: TreeNode): function preorder (line 28) | def preorder(tree: TreeNode): function postorder (line 35) | def postorder(tree: TreeNode): FILE: trees/tree-traversal/inorder-traversal-example.py function tree_parser (line 14) | def tree_parser(s: str) -> TreeNode: function inorder (line 43) | def inorder(node: TreeNode) -> str: FILE: trees/tree-traversal/postorder-traversal-example.py function tree_parser (line 14) | def tree_parser(s: str) -> TreeNode: function postorder (line 43) | def postorder(node: TreeNode) -> str: FILE: trees/tree-traversal/preorder-traversal-example.py function tree_parser (line 14) | def tree_parser(s: str) -> TreeNode: function preorder (line 43) | def preorder(node: TreeNode, space: int = 0): FILE: trees/tree-traversal/stack.py class Stack (line 1) | class Stack: method __init__ (line 2) | def __init__(self): method is_empty (line 5) | def is_empty(self): method push (line 8) | def push(self, item): method pop (line 11) | def pop(self): method peek (line 14) | def peek(self): method size (line 17) | def size(self): FILE: trees/tree-traversal/treenode.py class TreeNode (line 1) | class TreeNode: method __init__ (line 2) | def __init__(self, key=None, left=None, right=None): method insert_root_value (line 7) | def insert_root_value(self, key=None): method insert_left (line 10) | def insert_left(self, key=None): method insert_right (line 13) | def insert_right(self, key=None): method get_root_value (line 16) | def get_root_value(self): method get_left_child (line 19) | def get_left_child(self): method get_right_child (line 22) | def get_right_child(self): method inorder (line 25) | def inorder(self): method preorder (line 32) | def preorder(self): method postorder (line 39) | def postorder(self): FILE: trie/trie.py class TrieNode (line 2) | class TrieNode: method __init__ (line 3) | def __init__(self, key, parent = None, children: dict = {}): class Trie (line 9) | class Trie: method __init__ (line 10) | def __init__(self): method insert (line 13) | def insert(self, string: str): method contains (line 21) | def contains(self, string: str)->bool: method delete (line 32) | def delete(self, string: str): method prefix (line 48) | def prefix(self, prefix: str)->list: method helper (line 61) | def helper(self, node: TrieNode, words: list, currentWord: str): method allWords (line 69) | def allWords(self)->list: method count (line 74) | def count(self)->int: method countHelper (line 77) | def countHelper(self, node: TrieNode)->int: