├── .gitignore ├── 1_003_How Solve Problems ├── 001_daysBetweenDates.py ├── 002_Quiz_Define_daysBetweenDates.py ├── 003_Quiz_Test_for_valid_Inputs.py └── 004_Quiz_Finish_daysBetweenDates.py ├── 1_004_Efficiency ├── Efficiency.ipynb └── assets │ └── bigo.svg ├── 1_005_Project_Unscramble_Computer_Science_Problems ├── Analysis.txt ├── Task0.py ├── Task1.py ├── Task2.py ├── Task3.py ├── Task4.py ├── calls.csv ├── submit.zip └── texts.csv ├── 2_001_Arrays and Linked Lists ├── 001_Practice_Strings.py ├── 001_Strings.ipynb ├── 002_Implementing a Linked List.py ├── 002_Implementing and traversing a linked list.ipynb ├── 003_Linked Lists Basics.ipynb ├── 004_Linked List Practice.ipynb ├── 004_Linked List Practice.py ├── 005_Reverse a Linked List.ipynb ├── 006_Detecting Loops.ipynb ├── 007_Flattening a nested linked list.ipynb ├── 007_Flattening a nested linked list.py ├── 008_Add-One.ipynb ├── 008_Add-One.py ├── 009_Duplicate-Number.ipynb ├── 010_Max-Sum-Subarray.ipynb ├── 010_Max-Sum-Subarray.py ├── 011_Pascal's-Triangle.ipynb ├── 011_Pascal's-Triangle.py ├── 012_Even-After-Odd-Nodes.ipynb ├── 012_Even-After-Odd-Nodes.py ├── 013_Skip-i-delete-j.ipynb ├── 013_Skip-i-delete-j.py ├── 014_Swap-Nodes.ipynb ├── 014_Swap-Nodes.py ├── assets │ ├── circular_linked_list.png │ ├── doubly_linked_list.png │ ├── linked_list_head_none.png │ ├── linked_list_two_nodes.png │ ├── singly_linked_list.png │ └── two_runners_circular.png ├── jupytergraffiti ├── jupytergraffiti_data │ └── notebooks │ │ ├── id_11ltg2a │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_2oggofo │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_8zd3m5b │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_9v48ov8 │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_ao3gp0i │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_cuns29g │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_cwbhghd │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_dvlxolz │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_jzh7rvz │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_lav5dxq │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_onfkwff │ │ └── authors │ │ │ └── 10835321903 │ │ │ ├── cells │ │ │ ├── id_ef8aj0i │ │ │ │ └── graffitis │ │ │ │ │ └── id_uy9snfg │ │ │ │ │ └── takes │ │ │ │ │ └── id_lfns3jm │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_fgyadie │ │ │ │ └── graffitis │ │ │ │ │ └── id_g9gdx9q │ │ │ │ │ └── takes │ │ │ │ │ ├── id_58jnptq │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ └── id_l4myuzw │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_fx1ii1b │ │ │ │ └── graffitis │ │ │ │ │ └── id_p4ecakd │ │ │ │ │ └── takes │ │ │ │ │ ├── id_60bz81c │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ ├── id_6awj3bd │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ ├── id_gj313qw │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ ├── id_lyg8cfw │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ └── id_susr4y5 │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ └── id_rytkj5r │ │ │ │ └── graffitis │ │ │ │ └── id_b4xxfs5 │ │ │ │ └── takes │ │ │ │ ├── id_14vpt1p │ │ │ │ ├── audio.txt │ │ │ │ └── history.txt │ │ │ │ └── id_q4b4jr7 │ │ │ │ ├── audio.txt │ │ │ │ └── history.txt │ │ │ └── manifest.json │ │ ├── id_qd2ksva │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_r353lsv │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ └── id_s3vt1b9 │ │ └── authors │ │ └── dev │ │ └── manifest.json └── solutions │ ├── Add-One_solution.py │ ├── Duplicate-Number_solution.py │ ├── Even-After-Odd-Nodes_solution.py │ ├── Max-Sum-Subarray_solution.py │ ├── Pascal's-Triangle_solution.py │ ├── Skip-i-delete-j_solution.py │ ├── Strings_1.py │ ├── Strings_2.py │ ├── Strings_3.py │ ├── Strings_4.py │ ├── Swap-Nodes_solution.py │ ├── linked_lists_intro_solution_01.py │ ├── linked_lists_intro_solution_02.py │ ├── linked_lists_intro_solution_03.py │ ├── linked_lists_intro_solution_04.py │ ├── linked_lists_intro_solution_05.py │ ├── ll_basic_1.py │ ├── ll_basic_2.py │ ├── ll_loop_detection.py │ ├── ll_practice.py │ ├── ll_reverse.py │ ├── ll_sorted_1.py │ └── ll_sorted_2.py ├── 2_002_Stack and Queues ├── 001_Implement a stack using an array.ipynb ├── 002_Implement a stack using a linked list.ipynb ├── 003_python_stack_practice.ipynb ├── 004_Balanced Parentheses Exercise - Stacks.ipynb ├── 005_Reverse Polish notation.ipynb ├── 005_Reverse Polish notation.py ├── 006_Reverse a stack.ipynb ├── 006_Reverse a stack.py ├── 007_Minimum bracket reversals.ipynb ├── 007_Minimum bracket reversals.py ├── 008_Build a queue using an array.ipynb ├── 009_Build a queue using a linked list.ipynb ├── 010_Build a Queue Using a Stack.ipynb ├── 010_Build a Queue Using a Stack.py ├── 011_Build a Queue Using High-Level Python.ipynb ├── 012_Reverse a queue.ipynb ├── 012_Reverse a queue.py ├── assets │ ├── containers_and_stacks.png │ ├── linked_list_five_nodes.png │ ├── queue_people.png │ └── queue_with_array.png ├── jupytergraffiti_data │ └── notebooks │ │ ├── id_4ashoye │ │ └── authors │ │ │ └── 10835321903 │ │ │ ├── cells │ │ │ ├── id_21k0jl7 │ │ │ │ └── graffitis │ │ │ │ │ └── id_1axklhx │ │ │ │ │ └── takes │ │ │ │ │ └── id_1rjwqsw │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_33sdd37 │ │ │ │ └── graffitis │ │ │ │ │ └── id_a5x7quf │ │ │ │ │ └── takes │ │ │ │ │ ├── id_bgr2lpt │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ └── id_nxvwz04 │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_e0wuf6a │ │ │ │ └── graffitis │ │ │ │ │ └── id_1ldgv9h │ │ │ │ │ └── takes │ │ │ │ │ └── id_y88yoaa │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_syp82vq │ │ │ │ └── graffitis │ │ │ │ │ └── id_06cws2s │ │ │ │ │ └── takes │ │ │ │ │ └── id_081j068 │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ └── id_vhjw9tp │ │ │ │ └── graffitis │ │ │ │ └── id_iv1zb1u │ │ │ │ └── takes │ │ │ │ └── id_r0wrwzf │ │ │ │ ├── audio.txt │ │ │ │ └── history.txt │ │ │ └── manifest.json │ │ ├── id_5gpoh6p │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_5jzd4pe │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_7qeckks │ │ └── authors │ │ │ └── 10835321903 │ │ │ ├── cells │ │ │ ├── id_2ge7ywz │ │ │ │ └── graffitis │ │ │ │ │ └── id_bqg3jzc │ │ │ │ │ └── takes │ │ │ │ │ ├── id_21x9cqx │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ ├── id_8q8wcxq │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ ├── id_c4g8dgx │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ ├── id_nvvdkp8 │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ └── id_uqyfjts │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_5tekmtx │ │ │ │ └── graffitis │ │ │ │ │ └── id_p546sb0 │ │ │ │ │ └── takes │ │ │ │ │ ├── id_3gqpxw3 │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ └── id_9rlphdz │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_dvk829u │ │ │ │ └── graffitis │ │ │ │ │ └── id_w3049bo │ │ │ │ │ └── takes │ │ │ │ │ ├── id_4dj0ypm │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ └── id_hfgujbe │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_lxj6sba │ │ │ │ └── graffitis │ │ │ │ │ └── id_yqicw47 │ │ │ │ │ └── takes │ │ │ │ │ ├── id_556wdcs │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ └── id_a3oxydl │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_pavyplt │ │ │ │ └── graffitis │ │ │ │ │ └── id_evc6ky2 │ │ │ │ │ └── takes │ │ │ │ │ ├── id_cb0vo7j │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ │ │ └── id_pctckpb │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ ├── id_spuqydc │ │ │ │ └── graffitis │ │ │ │ │ └── id_g2v8fid │ │ │ │ │ └── takes │ │ │ │ │ └── id_xasc9l8 │ │ │ │ │ ├── audio.txt │ │ │ │ │ └── history.txt │ │ │ └── id_u7ll4fe │ │ │ │ └── graffitis │ │ │ │ └── id_5jy6p59 │ │ │ │ └── takes │ │ │ │ ├── id_1yezbzh │ │ │ │ ├── audio.txt │ │ │ │ └── history.txt │ │ │ │ └── id_s2p51wb │ │ │ │ ├── audio.txt │ │ │ │ └── history.txt │ │ │ └── manifest.json │ │ ├── id_hlxplqn │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_hnsofe2 │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_imsru9x │ │ └── authors │ │ │ └── 10835321903 │ │ │ ├── cells │ │ │ └── id_1gfxpqm │ │ │ │ └── graffitis │ │ │ │ └── id_shwp6yi │ │ │ │ └── takes │ │ │ │ └── id_r0g1owe │ │ │ │ ├── audio.txt │ │ │ │ └── history.txt │ │ │ └── manifest.json │ │ ├── id_m05og16 │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_mokjq6m │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_tmlgmwj │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_uouib6j │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ └── id_zz4xk06 │ │ └── authors │ │ └── 10835321903 │ │ ├── cells │ │ ├── id_5ivl2se │ │ │ └── graffitis │ │ │ │ └── id_phfcwhs │ │ │ │ └── takes │ │ │ │ ├── id_t65hx03 │ │ │ │ ├── audio.txt │ │ │ │ └── history.txt │ │ │ │ └── id_yqdfl7q │ │ │ │ ├── audio.txt │ │ │ │ └── history.txt │ │ └── id_offet8s │ │ │ └── graffitis │ │ │ └── id_emzar9o │ │ │ └── takes │ │ │ └── id_rlbz91d │ │ │ ├── audio.txt │ │ │ └── history.txt │ │ └── manifest.json └── solutions │ ├── build_stack.py │ ├── min_bracket.py │ ├── parent_stack.py │ ├── polish.py │ ├── queue_build.py │ ├── queue_stack.py │ ├── queues_arrays_solution_01.py │ ├── queues_arrays_solution_02.py │ ├── queues_arrays_solution_03.py │ ├── queues_arrays_solution_04.py │ ├── queues_arrays_solution_05.py │ ├── queues_linked_list_solution_01.py │ ├── queues_linked_list_solution_02.py │ ├── queues_linked_list_solution_03.py │ ├── queues_linked_list_solution_04.py │ ├── queues_linked_list_solution_05.py │ ├── reverse_queue.py │ ├── reverse_stack.py │ ├── stack_using_array_solution_01.py │ ├── stack_using_array_solution_02.py │ ├── stack_using_array_solution_03.py │ ├── stack_using_array_solution_04.py │ ├── stack_using_array_solution_05.py │ ├── stack_using_linked_list_solution_01.py │ ├── stack_using_linked_list_solution_02.py │ ├── stack_using_linked_list_solution_03.py │ ├── stack_using_linked_list_solution_04.py │ └── stack_using_linked_list_solution_05.py ├── 2_003_Recursion ├── 001_introduction.ipynb ├── 002_Factorial using recursion.ipynb ├── 003_Reversing a string.ipynb ├── 004_Checking Palindrome.ipynb ├── 005_List Permutation.ipynb ├── 005_List Permutation.py ├── 006_String-Permutations.ipynb ├── 007_Keypad Combinations.ipynb ├── 007_Keypad Combinations.py ├── 008_Deep Reverse.ipynb ├── 008_Deep Reverse.py ├── 009_Call stack.ipynb ├── 010_Recurrence Relations.ipynb ├── 011_Tower-of-Hanoi.ipynb ├── 012_Return-Codes.ipynb ├── 013_Return-Subsets.ipynb ├── 013_Return-Subsets.py ├── 014_Staircase.ipynb ├── 014_Staircase.py ├── 015_Last-index-recursion.ipynb ├── 015_Last-index-recursion.py ├── jupytergraffiti ├── jupytergraffiti_data │ └── notebooks │ │ ├── id_0z6x8e1 │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_4mbef37 │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_at34t9a │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_c01kx0l │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_engua4l │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_gm7n621 │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_kdfaoy8 │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_lyhj8gh │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_q1h5fuv │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_qnn6fxn │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_r9gorho │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_u69esyt │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ └── id_vgdsias │ │ └── authors │ │ └── 10694620118 │ │ └── manifest.json ├── recurrence-relation-resources │ └── 01.png ├── solutions │ ├── Last-index-recursion_solution.py │ ├── Return-Codes_solution.py │ ├── Return-Subsets_solution.py │ ├── Staircase_solution.py │ ├── String-Permutation_solution.py │ ├── call_stack_solution.py │ ├── deep_reverse_solution.py │ ├── rec_factorial.py │ ├── rec_palindrome.py │ ├── rec_perm.py │ ├── rec_string_rev.py │ └── tower_of_hanoi_solution.py └── stack-frame-resources │ ├── 00.png │ ├── 01.png │ ├── 02.png │ ├── 03.png │ └── 04.png ├── 2_004_Trees ├── 001 Create_a_binary_tree.ipynb ├── 001 Create_a_binary_tree_solution.ipynb ├── 002 traverse_a_tree_dfs.ipynb ├── 002 traverse_a_tree_dfs.py ├── 002 traverse_a_tree_dfs_solution.ipynb ├── 003 traverse_a_tree_bfs.ipynb ├── 003 traverse_a_tree_bfs_solution.ipynb ├── 004 binary_search_tree.ipynb ├── 004 binary_search_tree.py ├── 004 binary_search_tree_solution.ipynb ├── 005_Diameter of a Binary Tree.ipynb ├── 005_Diameter of a Binary Tree.py ├── 006_Path-from-root-to-node.ipynb ├── 006_Path-from-root-to-node.py ├── images │ ├── bst_01.png │ ├── tree_01.png │ └── tree_02.png ├── resources │ └── 01-binary-tree.png └── solutions │ ├── diameter_of_a_binary_tree_solution.py │ └── path_from_root_to_node_solution.py ├── 2_005_Maps and Hashing ├── 001_Introduction to Maps.ipynb ├── 002_HashMap.ipynb ├── 003_Caching.ipynb ├── 004_String Key Hash Table.ipynb ├── 005_Pair-Sum-to-target.ipynb ├── 006_Longest-Consecutive-Subsequence.ipynb ├── 006_Longest-Consecutive-Subsequence.py ├── jupytergraffiti ├── jupytergraffiti_data │ └── notebooks │ │ ├── id_72hc5z3 │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_alotytm │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_b6lwqu3 │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_dfjao7b │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ └── id_vvgwoq6 │ │ └── authors │ │ └── 10694620118 │ │ └── manifest.json └── resources │ ├── c1.py │ ├── c2.py │ ├── long_con_sub.py │ ├── maps.py │ └── pair.py ├── 2_006_Project_Show_me_Data_Structures ├── 001_Problem_1.py ├── 002_Problem_2.py ├── 003_Problem_3.py ├── 004_Problem_4.py ├── 005_Problem_5.py ├── 006_Problem_6.py ├── explanation.md ├── submit.zip └── testdir │ ├── subdir1 │ ├── a.c │ └── a.h │ ├── subdir2 │ └── .gitkeep │ ├── subdir3 │ └── subsubdir1 │ │ ├── b.c │ │ └── b.h │ ├── subdir4 │ └── .gitkeep │ ├── subdir5 │ ├── a.c │ └── a.h │ ├── t1.c │ └── t1.h ├── 3_001_Basic Algorithms ├── 001_Guess the number.ipynb ├── 002_Binary search practice.ipynb ├── 002_Binary search practice.py ├── 003_Binary search variations.ipynb ├── 004_First and last index.ipynb ├── 004_First and last index.py ├── 005_Trie introduction.ipynb ├── 005_Trie introduction.py ├── 005_Trie introduction_defaultdict.py ├── 006_Heap introduction.ipynb ├── 006_Heap introduction.py ├── 007_Red Black Tree Walkthrough.ipynb ├── jupytergraffiti ├── jupytergraffiti_data │ └── notebooks │ │ ├── id_4i2q7we │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_57afwqr │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_qwr7xir │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_rnq144a │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_shgx70q │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ └── id_sog6g29 │ │ └── authors │ │ └── 10694620118 │ │ └── manifest.json ├── resources │ ├── 01-bst.png │ ├── 01-cbt.png │ ├── 01-max-heap.png │ ├── 01-min-heap.png │ ├── 02-bst.png │ ├── 02-cbt.png │ ├── 02-max-heap.png │ ├── 02-min-heap.png │ ├── 03-cbt.png │ ├── 03-max-heap.png │ ├── 04-cbt.png │ ├── 05-cbt.png │ ├── 06-cbt.png │ ├── 07-cbt.png │ ├── 08-cbt.png │ ├── 09-cbt.png │ ├── 10-cbt.png │ ├── 12-cbt.png │ ├── 13-cbt.png │ └── Screen Shot 2019-04-21 at 11.46.48 PM.png └── solutions │ ├── Binary_search_practice_solution_01.py │ ├── Binary_search_practice_solution_02.py │ ├── First_and_last_index_solution.py │ ├── heap_introduction_1_solution.py │ ├── heap_introduction_2_solution.py │ ├── heapsort.py │ ├── rec_bin_search.py │ ├── trie_introduction_solution_1.py │ └── trie_introduction_solution_2.py ├── 3_002_Sorting Algorithms ├── 001_Bubble sort.ipynb ├── 001_Bubble sort.py ├── 002_Merge sort - Walkthrough.ipynb ├── 003_Counting Inversions.ipynb ├── 003_Counting Inversions.py ├── 004_Case Specific Sorting of Strings.ipynb ├── 004_Case Specific Sorting of Strings.py ├── 005_QuickSort - Walkthough.ipynb ├── 006_HeapSort.ipynb ├── 006_HeapSort.py ├── 007_Pair Sum Problem.ipynb ├── 007_Pair Sum Problem.py ├── 008_Sort-0-1-2.ipynb ├── jupytergraffiti ├── jupytergraffiti_data │ └── notebooks │ │ ├── id_0hd22kb │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_2rhwg9e │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_9ub8eru │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_ni46pwa │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ └── id_v3szme8 │ │ └── authors │ │ └── dev │ │ └── manifest.json └── solutions │ ├── Case_specific_sorting_of_strings_solution.py │ ├── Counting_inversions_solution.py │ ├── Pair_sum_problem_solution.py │ ├── Sort-0-1-2_solution.py │ ├── bubble_sort_exercises_solution_1.py │ └── bubble_sort_exercises_solution_2.py ├── 3_003_Project_Problems_vs_Algorithms ├── 001_Problem_1.py ├── 002_Problem_2.py ├── 003_Problem_3.py ├── 004_Problem_4.py ├── 005_Problem_5.ipynb ├── 005_Problem_5.py ├── 006_Problem_6.py ├── 007_Problem_7.py ├── explanation.md └── submit.zip ├── 4_001_Greedy Algorithms ├── 001_Greedy Introduction.ipynb ├── 002_Min Platforms.ipynb ├── 002_Min Platforms.py ├── 003_Min Operations.ipynb ├── 003_Min Operations.py ├── jupytergraffiti ├── jupytergraffiti_data │ └── notebooks │ │ ├── id_l7u9zeh │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ └── id_zzreyx5 │ │ └── authors │ │ └── dev │ │ └── manifest.json ├── resources │ ├── 01-greedy.png │ └── 02-greedy.png └── solutions │ ├── min_operations_solution.py │ └── min_platforms_solution_1.py ├── 4_002_Graph Algorithms ├── 001_Graph DFS.ipynb ├── 001_Graph DFS.py ├── 002_DFS recursion.ipynb ├── 003_Graph_BFS.ipynb ├── 003_Graph_BFS.py ├── 004_Dijkstra.ipynb ├── 004_Dijkstra.py ├── 005_Connecting Islands.ipynb ├── 005_Connecting Islands.py ├── assets │ ├── bfs.gif │ └── graphs.jpg ├── jupytergraffiti ├── jupytergraffiti_data │ └── notebooks │ │ ├── id_9f31yr7 │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_j75mgso │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_kq4h66c │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ └── id_xw4if85 │ │ └── authors │ │ └── dev │ │ └── manifest.json └── solutions │ ├── Connecting-Islands_solution.py │ ├── dijkstra_solution_1.py │ ├── graph_bfs_solution_1.py │ └── graph_dfs_solution_1.py ├── 4_003_Dynamic Programming ├── 001_Knapsack problem.ipynb ├── 001_Knapsack problem.py ├── 002_Longest Common Subsequence.ipynb ├── 002_Longest Common Subsequence.py ├── 003_Longest Palindromic Sequence.ipynb ├── 003_Longest Palindromic Sequence.py ├── 004_Coin Change.ipynb ├── 004_Coin Change.py ├── 005_Stock Prices.ipynb ├── 005_Stock Prices.py ├── jupytergraffiti ├── jupytergraffiti_data │ └── notebooks │ │ ├── id_0hxxyvu │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_43ea6fg │ │ └── authors │ │ │ └── 10694620118 │ │ │ └── manifest.json │ │ ├── id_c8cwdgc │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ ├── id_gm2dsgo │ │ └── authors │ │ │ └── dev │ │ │ └── manifest.json │ │ └── id_w5rg0wc │ │ └── authors │ │ └── 10694620118 │ │ └── manifest.json ├── notebook_ims │ ├── initial_matrix.png │ ├── matrix_2.png │ ├── matrix_3_match.png │ ├── matrix_4.png │ ├── matrix_5.png │ ├── matrix_6_complete.png │ └── matrix_rules.png └── solutions │ ├── coin_1.py │ ├── coin_2.py │ ├── knapsack_problem_solution_1.py │ ├── longest_common_subsequence_solution_1.py │ ├── longest_common_subsequence_solution_2.py │ ├── longest_palindromic_subsequence_solution.py │ └── stock.py ├── 4_004_Project_Implement_Route_Planner ├── helpers.py ├── map-10.pickle ├── map-40.pickle ├── project_notebook.ipynb ├── student_code.py ├── student_code_local.py └── test.py ├── LICENSE ├── README.md └── theory └── Big-O Cheatsheet.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | 106 | # Pycharm 107 | .idea/ 108 | 109 | # Jupyter 110 | .ipynb_checkpoints -------------------------------------------------------------------------------- /1_003_How Solve Problems/001_daysBetweenDates.py: -------------------------------------------------------------------------------- 1 | def daysBetweenDates(year1, month1, day1, year2, month2, day2): 2 | """ 3 | Calculates the number of days between two dates. 4 | """ 5 | 6 | # TODO - by the end of this lesson you will have 7 | # completed this function. You do not need to complete 8 | # it yet though! 9 | 10 | if day2 >= day1: 11 | year_days = (year2 - year1) * 365 12 | month_days = (month2 - month1) * 30 13 | day_days = day2 - day1 14 | total_days = year_days + month_days + day_days 15 | 16 | else: # day1 > day2 17 | day_compensator = (31 - day1) + 1 18 | if month1 > 11: 19 | month1 = 1 20 | year1 += 1 21 | else: 22 | month1 += 1 23 | day1 = 1 24 | 25 | year_days = (year2 - year1) * 365 26 | month_days = (month2 - month1) * 30 27 | day_days = day2 - day1 28 | 29 | total_days = year_days + month_days + day_days + day_compensator 30 | 31 | return total_days 32 | 33 | 34 | daysBetweenDates(2017, 12, 30, 2018, 1, 1) -------------------------------------------------------------------------------- /1_003_How Solve Problems/002_Quiz_Define_daysBetweenDates.py: -------------------------------------------------------------------------------- 1 | # Define a daysBetweenDates procedure that would produce the 2 | # correct output if there was a correct nextDay procedure. 3 | # 4 | # Note that this will NOT produce correct outputs yet, since 5 | # our nextDay procedure assumes all months have 30 days 6 | # (hence a year is 360 days, instead of 365). 7 | # 8 | 9 | def nextDay(year, month, day): 10 | """Simple version: assume every month has 30 days""" 11 | if day < 30: 12 | return year, month, day + 1 13 | else: 14 | if month == 12: 15 | return year + 1, 1, 1 16 | else: 17 | return year, month + 1, 1 18 | 19 | 20 | def equal_dates(year1, month1, day1, year2, month2, day2): 21 | """ Checks if two dates are equal or not""" 22 | return year1 == year2 and month1 == month2 and day1 == day2 23 | 24 | 25 | def daysBetweenDates(year1, month1, day1, year2, month2, day2): 26 | """Returns the number of days between year1/month1/day1 27 | and year2/month2/day2. Assumes inputs are valid dates 28 | in Gregorian calendar, and the first date is not after 29 | the second.""" 30 | 31 | num_days = 0 32 | 33 | while not equal_dates(year1, month1, day1, year2, month2, day2): 34 | year1, month1, day1 = nextDay(year1, month1, day1) 35 | num_days += 1 36 | return num_days 37 | 38 | 39 | def test(): 40 | test_cases = [((2012, 9, 30, 2012, 10, 30), 30), 41 | ((2012, 1, 1, 2013, 1, 1), 360), 42 | ((2012, 9, 1, 2012, 9, 4), 3)] 43 | 44 | for (args, answer) in test_cases: 45 | result = daysBetweenDates(*args) 46 | if result != answer: 47 | print 48 | "Test with data:", args, "failed" 49 | else: 50 | print 51 | "Test case passed!" 52 | 53 | 54 | test() -------------------------------------------------------------------------------- /1_005_Project_Unscramble_Computer_Science_Problems/Task0.py: -------------------------------------------------------------------------------- 1 | """ 2 | Read file into texts and calls. 3 | It's ok if you don't understand how to read files. 4 | """ 5 | import csv 6 | with open('texts.csv', 'r') as f: 7 | reader = csv.reader(f) 8 | texts = list(reader) 9 | 10 | with open('calls.csv', 'r') as f: 11 | reader = csv.reader(f) 12 | calls = list(reader) 13 | 14 | 15 | """ 16 | TASK 0: 17 | What is the first record of texts and what is the last record of calls? 18 | Print messages: 19 | "First record of texts, texts at time