From 73936f653b63d6bde4693b1aaa62266435b69328 Mon Sep 17 00:00:00 2001 From: Wissam Fawaz Date: Sun, 16 Oct 2022 09:15:25 +0300 Subject: [PATCH 01/12] Added a Pascal triangle implementation to the other folder --- DIRECTORY.md | 2056 +++++++++++++++++++------------------- other/pascal_triangle.py | 54 + 2 files changed, 1103 insertions(+), 1007 deletions(-) create mode 100644 other/pascal_triangle.py diff --git a/DIRECTORY.md b/DIRECTORY.md index 92bed9cb4c6e..53035f1b9426 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -1,1090 +1,1132 @@ - ## Arithmetic Analysis - * [Bisection](arithmetic_analysis/bisection.py) - * [Gaussian Elimination](arithmetic_analysis/gaussian_elimination.py) - * [In Static Equilibrium](arithmetic_analysis/in_static_equilibrium.py) - * [Intersection](arithmetic_analysis/intersection.py) - * [Jacobi Iteration Method](arithmetic_analysis/jacobi_iteration_method.py) - * [Lu Decomposition](arithmetic_analysis/lu_decomposition.py) - * [Newton Forward Interpolation](arithmetic_analysis/newton_forward_interpolation.py) - * [Newton Method](arithmetic_analysis/newton_method.py) - * [Newton Raphson](arithmetic_analysis/newton_raphson.py) - * [Newton Raphson New](arithmetic_analysis/newton_raphson_new.py) - * [Secant Method](arithmetic_analysis/secant_method.py) + +- [Bisection](arithmetic_analysis/bisection.py) +- [Gaussian Elimination](arithmetic_analysis/gaussian_elimination.py) +- [In Static Equilibrium](arithmetic_analysis/in_static_equilibrium.py) +- [Intersection](arithmetic_analysis/intersection.py) +- [Jacobi Iteration Method](arithmetic_analysis/jacobi_iteration_method.py) +- [Lu Decomposition](arithmetic_analysis/lu_decomposition.py) +- [Newton Forward Interpolation](arithmetic_analysis/newton_forward_interpolation.py) +- [Newton Method](arithmetic_analysis/newton_method.py) +- [Newton Raphson](arithmetic_analysis/newton_raphson.py) +- [Newton Raphson New](arithmetic_analysis/newton_raphson_new.py) +- [Secant Method](arithmetic_analysis/secant_method.py) ## Audio Filters - * [Butterworth Filter](audio_filters/butterworth_filter.py) - * [Equal Loudness Filter](audio_filters/equal_loudness_filter.py) - * [Iir Filter](audio_filters/iir_filter.py) - * [Show Response](audio_filters/show_response.py) + +- [Butterworth Filter](audio_filters/butterworth_filter.py) +- [Equal Loudness Filter](audio_filters/equal_loudness_filter.py) +- [Iir Filter](audio_filters/iir_filter.py) +- [Show Response](audio_filters/show_response.py) ## Backtracking - * [All Combinations](backtracking/all_combinations.py) - * [All Permutations](backtracking/all_permutations.py) - * [All Subsequences](backtracking/all_subsequences.py) - * [Coloring](backtracking/coloring.py) - * [Hamiltonian Cycle](backtracking/hamiltonian_cycle.py) - * [Knight Tour](backtracking/knight_tour.py) - * [Minimax](backtracking/minimax.py) - * [N Queens](backtracking/n_queens.py) - * [N Queens Math](backtracking/n_queens_math.py) - * [Rat In Maze](backtracking/rat_in_maze.py) - * [Sudoku](backtracking/sudoku.py) - * [Sum Of Subsets](backtracking/sum_of_subsets.py) + +- [All Combinations](backtracking/all_combinations.py) +- [All Permutations](backtracking/all_permutations.py) +- [All Subsequences](backtracking/all_subsequences.py) +- [Coloring](backtracking/coloring.py) +- [Hamiltonian Cycle](backtracking/hamiltonian_cycle.py) +- [Knight Tour](backtracking/knight_tour.py) +- [Minimax](backtracking/minimax.py) +- [N Queens](backtracking/n_queens.py) +- [N Queens Math](backtracking/n_queens_math.py) +- [Rat In Maze](backtracking/rat_in_maze.py) +- [Sudoku](backtracking/sudoku.py) +- [Sum Of Subsets](backtracking/sum_of_subsets.py) ## Bit Manipulation - * [Binary And Operator](bit_manipulation/binary_and_operator.py) - * [Binary Count Setbits](bit_manipulation/binary_count_setbits.py) - * [Binary Count Trailing Zeros](bit_manipulation/binary_count_trailing_zeros.py) - * [Binary Or Operator](bit_manipulation/binary_or_operator.py) - * [Binary Shifts](bit_manipulation/binary_shifts.py) - * [Binary Twos Complement](bit_manipulation/binary_twos_complement.py) - * [Binary Xor Operator](bit_manipulation/binary_xor_operator.py) - * [Count 1S Brian Kernighan Method](bit_manipulation/count_1s_brian_kernighan_method.py) - * [Count Number Of One Bits](bit_manipulation/count_number_of_one_bits.py) - * [Gray Code Sequence](bit_manipulation/gray_code_sequence.py) - * [Reverse Bits](bit_manipulation/reverse_bits.py) - * [Single Bit Manipulation Operations](bit_manipulation/single_bit_manipulation_operations.py) + +- [Binary And Operator](bit_manipulation/binary_and_operator.py) +- [Binary Count Setbits](bit_manipulation/binary_count_setbits.py) +- [Binary Count Trailing Zeros](bit_manipulation/binary_count_trailing_zeros.py) +- [Binary Or Operator](bit_manipulation/binary_or_operator.py) +- [Binary Shifts](bit_manipulation/binary_shifts.py) +- [Binary Twos Complement](bit_manipulation/binary_twos_complement.py) +- [Binary Xor Operator](bit_manipulation/binary_xor_operator.py) +- [Count 1S Brian Kernighan Method](bit_manipulation/count_1s_brian_kernighan_method.py) +- [Count Number Of One Bits](bit_manipulation/count_number_of_one_bits.py) +- [Gray Code Sequence](bit_manipulation/gray_code_sequence.py) +- [Reverse Bits](bit_manipulation/reverse_bits.py) +- [Single Bit Manipulation Operations](bit_manipulation/single_bit_manipulation_operations.py) ## Blockchain - * [Chinese Remainder Theorem](blockchain/chinese_remainder_theorem.py) - * [Diophantine Equation](blockchain/diophantine_equation.py) - * [Modular Division](blockchain/modular_division.py) + +- [Chinese Remainder Theorem](blockchain/chinese_remainder_theorem.py) +- [Diophantine Equation](blockchain/diophantine_equation.py) +- [Modular Division](blockchain/modular_division.py) ## Boolean Algebra - * [Norgate](boolean_algebra/norgate.py) - * [Quine Mc Cluskey](boolean_algebra/quine_mc_cluskey.py) + +- [Norgate](boolean_algebra/norgate.py) +- [Quine Mc Cluskey](boolean_algebra/quine_mc_cluskey.py) ## Cellular Automata - * [Conways Game Of Life](cellular_automata/conways_game_of_life.py) - * [Game Of Life](cellular_automata/game_of_life.py) - * [Nagel Schrekenberg](cellular_automata/nagel_schrekenberg.py) - * [One Dimensional](cellular_automata/one_dimensional.py) + +- [Conways Game Of Life](cellular_automata/conways_game_of_life.py) +- [Game Of Life](cellular_automata/game_of_life.py) +- [Nagel Schrekenberg](cellular_automata/nagel_schrekenberg.py) +- [One Dimensional](cellular_automata/one_dimensional.py) ## Ciphers - * [A1Z26](ciphers/a1z26.py) - * [Affine Cipher](ciphers/affine_cipher.py) - * [Atbash](ciphers/atbash.py) - * [Baconian Cipher](ciphers/baconian_cipher.py) - * [Base16](ciphers/base16.py) - * [Base32](ciphers/base32.py) - * [Base64](ciphers/base64.py) - * [Base85](ciphers/base85.py) - * [Beaufort Cipher](ciphers/beaufort_cipher.py) - * [Bifid](ciphers/bifid.py) - * [Brute Force Caesar Cipher](ciphers/brute_force_caesar_cipher.py) - * [Caesar Cipher](ciphers/caesar_cipher.py) - * [Cryptomath Module](ciphers/cryptomath_module.py) - * [Decrypt Caesar With Chi Squared](ciphers/decrypt_caesar_with_chi_squared.py) - * [Deterministic Miller Rabin](ciphers/deterministic_miller_rabin.py) - * [Diffie](ciphers/diffie.py) - * [Diffie Hellman](ciphers/diffie_hellman.py) - * [Elgamal Key Generator](ciphers/elgamal_key_generator.py) - * [Enigma Machine2](ciphers/enigma_machine2.py) - * [Hill Cipher](ciphers/hill_cipher.py) - * [Mixed Keyword Cypher](ciphers/mixed_keyword_cypher.py) - * [Mono Alphabetic Ciphers](ciphers/mono_alphabetic_ciphers.py) - * [Morse Code](ciphers/morse_code.py) - * [Onepad Cipher](ciphers/onepad_cipher.py) - * [Playfair Cipher](ciphers/playfair_cipher.py) - * [Polybius](ciphers/polybius.py) - * [Porta Cipher](ciphers/porta_cipher.py) - * [Rabin Miller](ciphers/rabin_miller.py) - * [Rail Fence Cipher](ciphers/rail_fence_cipher.py) - * [Rot13](ciphers/rot13.py) - * [Rsa Cipher](ciphers/rsa_cipher.py) - * [Rsa Factorization](ciphers/rsa_factorization.py) - * [Rsa Key Generator](ciphers/rsa_key_generator.py) - * [Shuffled Shift Cipher](ciphers/shuffled_shift_cipher.py) - * [Simple Keyword Cypher](ciphers/simple_keyword_cypher.py) - * [Simple Substitution Cipher](ciphers/simple_substitution_cipher.py) - * [Trafid Cipher](ciphers/trafid_cipher.py) - * [Transposition Cipher](ciphers/transposition_cipher.py) - * [Transposition Cipher Encrypt Decrypt File](ciphers/transposition_cipher_encrypt_decrypt_file.py) - * [Vigenere Cipher](ciphers/vigenere_cipher.py) - * [Xor Cipher](ciphers/xor_cipher.py) + +- [A1Z26](ciphers/a1z26.py) +- [Affine Cipher](ciphers/affine_cipher.py) +- [Atbash](ciphers/atbash.py) +- [Baconian Cipher](ciphers/baconian_cipher.py) +- [Base16](ciphers/base16.py) +- [Base32](ciphers/base32.py) +- [Base64](ciphers/base64.py) +- [Base85](ciphers/base85.py) +- [Beaufort Cipher](ciphers/beaufort_cipher.py) +- [Bifid](ciphers/bifid.py) +- [Brute Force Caesar Cipher](ciphers/brute_force_caesar_cipher.py) +- [Caesar Cipher](ciphers/caesar_cipher.py) +- [Cryptomath Module](ciphers/cryptomath_module.py) +- [Decrypt Caesar With Chi Squared](ciphers/decrypt_caesar_with_chi_squared.py) +- [Deterministic Miller Rabin](ciphers/deterministic_miller_rabin.py) +- [Diffie](ciphers/diffie.py) +- [Diffie Hellman](ciphers/diffie_hellman.py) +- [Elgamal Key Generator](ciphers/elgamal_key_generator.py) +- [Enigma Machine2](ciphers/enigma_machine2.py) +- [Hill Cipher](ciphers/hill_cipher.py) +- [Mixed Keyword Cypher](ciphers/mixed_keyword_cypher.py) +- [Mono Alphabetic Ciphers](ciphers/mono_alphabetic_ciphers.py) +- [Morse Code](ciphers/morse_code.py) +- [Onepad Cipher](ciphers/onepad_cipher.py) +- [Playfair Cipher](ciphers/playfair_cipher.py) +- [Polybius](ciphers/polybius.py) +- [Porta Cipher](ciphers/porta_cipher.py) +- [Rabin Miller](ciphers/rabin_miller.py) +- [Rail Fence Cipher](ciphers/rail_fence_cipher.py) +- [Rot13](ciphers/rot13.py) +- [Rsa Cipher](ciphers/rsa_cipher.py) +- [Rsa Factorization](ciphers/rsa_factorization.py) +- [Rsa Key Generator](ciphers/rsa_key_generator.py) +- [Shuffled Shift Cipher](ciphers/shuffled_shift_cipher.py) +- [Simple Keyword Cypher](ciphers/simple_keyword_cypher.py) +- [Simple Substitution Cipher](ciphers/simple_substitution_cipher.py) +- [Trafid Cipher](ciphers/trafid_cipher.py) +- [Transposition Cipher](ciphers/transposition_cipher.py) +- [Transposition Cipher Encrypt Decrypt File](ciphers/transposition_cipher_encrypt_decrypt_file.py) +- [Vigenere Cipher](ciphers/vigenere_cipher.py) +- [Xor Cipher](ciphers/xor_cipher.py) ## Compression - * [Burrows Wheeler](compression/burrows_wheeler.py) - * [Huffman](compression/huffman.py) - * [Lempel Ziv](compression/lempel_ziv.py) - * [Lempel Ziv Decompress](compression/lempel_ziv_decompress.py) - * [Peak Signal To Noise Ratio](compression/peak_signal_to_noise_ratio.py) - * [Run Length Encoding](compression/run_length_encoding.py) + +- [Burrows Wheeler](compression/burrows_wheeler.py) +- [Huffman](compression/huffman.py) +- [Lempel Ziv](compression/lempel_ziv.py) +- [Lempel Ziv Decompress](compression/lempel_ziv_decompress.py) +- [Peak Signal To Noise Ratio](compression/peak_signal_to_noise_ratio.py) +- [Run Length Encoding](compression/run_length_encoding.py) ## Computer Vision - * [Cnn Classification](computer_vision/cnn_classification.py) - * [Flip Augmentation](computer_vision/flip_augmentation.py) - * [Harris Corner](computer_vision/harris_corner.py) - * [Horn Schunck](computer_vision/horn_schunck.py) - * [Mean Threshold](computer_vision/mean_threshold.py) - * [Mosaic Augmentation](computer_vision/mosaic_augmentation.py) - * [Pooling Functions](computer_vision/pooling_functions.py) + +- [Cnn Classification](computer_vision/cnn_classification.py) +- [Flip Augmentation](computer_vision/flip_augmentation.py) +- [Harris Corner](computer_vision/harris_corner.py) +- [Horn Schunck](computer_vision/horn_schunck.py) +- [Mean Threshold](computer_vision/mean_threshold.py) +- [Mosaic Augmentation](computer_vision/mosaic_augmentation.py) +- [Pooling Functions](computer_vision/pooling_functions.py) ## Conversions - * [Astronomical Length Scale Conversion](conversions/astronomical_length_scale_conversion.py) - * [Binary To Decimal](conversions/binary_to_decimal.py) - * [Binary To Hexadecimal](conversions/binary_to_hexadecimal.py) - * [Binary To Octal](conversions/binary_to_octal.py) - * [Decimal To Any](conversions/decimal_to_any.py) - * [Decimal To Binary](conversions/decimal_to_binary.py) - * [Decimal To Binary Recursion](conversions/decimal_to_binary_recursion.py) - * [Decimal To Hexadecimal](conversions/decimal_to_hexadecimal.py) - * [Decimal To Octal](conversions/decimal_to_octal.py) - * [Excel Title To Column](conversions/excel_title_to_column.py) - * [Hex To Bin](conversions/hex_to_bin.py) - * [Hexadecimal To Decimal](conversions/hexadecimal_to_decimal.py) - * [Length Conversion](conversions/length_conversion.py) - * [Molecular Chemistry](conversions/molecular_chemistry.py) - * [Octal To Decimal](conversions/octal_to_decimal.py) - * [Prefix Conversions](conversions/prefix_conversions.py) - * [Prefix Conversions String](conversions/prefix_conversions_string.py) - * [Pressure Conversions](conversions/pressure_conversions.py) - * [Rgb Hsv Conversion](conversions/rgb_hsv_conversion.py) - * [Roman Numerals](conversions/roman_numerals.py) - * [Speed Conversions](conversions/speed_conversions.py) - * [Temperature Conversions](conversions/temperature_conversions.py) - * [Volume Conversions](conversions/volume_conversions.py) - * [Weight Conversion](conversions/weight_conversion.py) + +- [Astronomical Length Scale Conversion](conversions/astronomical_length_scale_conversion.py) +- [Binary To Decimal](conversions/binary_to_decimal.py) +- [Binary To Hexadecimal](conversions/binary_to_hexadecimal.py) +- [Binary To Octal](conversions/binary_to_octal.py) +- [Decimal To Any](conversions/decimal_to_any.py) +- [Decimal To Binary](conversions/decimal_to_binary.py) +- [Decimal To Binary Recursion](conversions/decimal_to_binary_recursion.py) +- [Decimal To Hexadecimal](conversions/decimal_to_hexadecimal.py) +- [Decimal To Octal](conversions/decimal_to_octal.py) +- [Excel Title To Column](conversions/excel_title_to_column.py) +- [Hex To Bin](conversions/hex_to_bin.py) +- [Hexadecimal To Decimal](conversions/hexadecimal_to_decimal.py) +- [Length Conversion](conversions/length_conversion.py) +- [Molecular Chemistry](conversions/molecular_chemistry.py) +- [Octal To Decimal](conversions/octal_to_decimal.py) +- [Prefix Conversions](conversions/prefix_conversions.py) +- [Prefix Conversions String](conversions/prefix_conversions_string.py) +- [Pressure Conversions](conversions/pressure_conversions.py) +- [Rgb Hsv Conversion](conversions/rgb_hsv_conversion.py) +- [Roman Numerals](conversions/roman_numerals.py) +- [Speed Conversions](conversions/speed_conversions.py) +- [Temperature Conversions](conversions/temperature_conversions.py) +- [Volume Conversions](conversions/volume_conversions.py) +- [Weight Conversion](conversions/weight_conversion.py) ## Data Structures - * Binary Tree - * [Avl Tree](data_structures/binary_tree/avl_tree.py) - * [Basic Binary Tree](data_structures/binary_tree/basic_binary_tree.py) - * [Binary Search Tree](data_structures/binary_tree/binary_search_tree.py) - * [Binary Search Tree Recursive](data_structures/binary_tree/binary_search_tree_recursive.py) - * [Binary Tree Mirror](data_structures/binary_tree/binary_tree_mirror.py) - * [Binary Tree Node Sum](data_structures/binary_tree/binary_tree_node_sum.py) - * [Binary Tree Traversals](data_structures/binary_tree/binary_tree_traversals.py) - * [Fenwick Tree](data_structures/binary_tree/fenwick_tree.py) - * [Inorder Tree Traversal 2022](data_structures/binary_tree/inorder_tree_traversal_2022.py) - * [Lazy Segment Tree](data_structures/binary_tree/lazy_segment_tree.py) - * [Lowest Common Ancestor](data_structures/binary_tree/lowest_common_ancestor.py) - * [Maximum Fenwick Tree](data_structures/binary_tree/maximum_fenwick_tree.py) - * [Merge Two Binary Trees](data_structures/binary_tree/merge_two_binary_trees.py) - * [Non Recursive Segment Tree](data_structures/binary_tree/non_recursive_segment_tree.py) - * [Number Of Possible Binary Trees](data_structures/binary_tree/number_of_possible_binary_trees.py) - * [Red Black Tree](data_structures/binary_tree/red_black_tree.py) - * [Segment Tree](data_structures/binary_tree/segment_tree.py) - * [Segment Tree Other](data_structures/binary_tree/segment_tree_other.py) - * [Treap](data_structures/binary_tree/treap.py) - * [Wavelet Tree](data_structures/binary_tree/wavelet_tree.py) - * Disjoint Set - * [Alternate Disjoint Set](data_structures/disjoint_set/alternate_disjoint_set.py) - * [Disjoint Set](data_structures/disjoint_set/disjoint_set.py) - * Hashing - * [Double Hash](data_structures/hashing/double_hash.py) - * [Hash Table](data_structures/hashing/hash_table.py) - * [Hash Table With Linked List](data_structures/hashing/hash_table_with_linked_list.py) - * Number Theory - * [Prime Numbers](data_structures/hashing/number_theory/prime_numbers.py) - * [Quadratic Probing](data_structures/hashing/quadratic_probing.py) - * Heap - * [Binomial Heap](data_structures/heap/binomial_heap.py) - * [Heap](data_structures/heap/heap.py) - * [Heap Generic](data_structures/heap/heap_generic.py) - * [Max Heap](data_structures/heap/max_heap.py) - * [Min Heap](data_structures/heap/min_heap.py) - * [Randomized Heap](data_structures/heap/randomized_heap.py) - * [Skew Heap](data_structures/heap/skew_heap.py) - * Linked List - * [Circular Linked List](data_structures/linked_list/circular_linked_list.py) - * [Deque Doubly](data_structures/linked_list/deque_doubly.py) - * [Doubly Linked List](data_structures/linked_list/doubly_linked_list.py) - * [Doubly Linked List Two](data_structures/linked_list/doubly_linked_list_two.py) - * [From Sequence](data_structures/linked_list/from_sequence.py) - * [Has Loop](data_structures/linked_list/has_loop.py) - * [Is Palindrome](data_structures/linked_list/is_palindrome.py) - * [Merge Two Lists](data_structures/linked_list/merge_two_lists.py) - * [Middle Element Of Linked List](data_structures/linked_list/middle_element_of_linked_list.py) - * [Print Reverse](data_structures/linked_list/print_reverse.py) - * [Singly Linked List](data_structures/linked_list/singly_linked_list.py) - * [Skip List](data_structures/linked_list/skip_list.py) - * [Swap Nodes](data_structures/linked_list/swap_nodes.py) - * Queue - * [Circular Queue](data_structures/queue/circular_queue.py) - * [Circular Queue Linked List](data_structures/queue/circular_queue_linked_list.py) - * [Double Ended Queue](data_structures/queue/double_ended_queue.py) - * [Linked Queue](data_structures/queue/linked_queue.py) - * [Priority Queue Using List](data_structures/queue/priority_queue_using_list.py) - * [Queue On List](data_structures/queue/queue_on_list.py) - * [Queue On Pseudo Stack](data_structures/queue/queue_on_pseudo_stack.py) - * Stacks - * [Balanced Parentheses](data_structures/stacks/balanced_parentheses.py) - * [Dijkstras Two Stack Algorithm](data_structures/stacks/dijkstras_two_stack_algorithm.py) - * [Evaluate Postfix Notations](data_structures/stacks/evaluate_postfix_notations.py) - * [Infix To Postfix Conversion](data_structures/stacks/infix_to_postfix_conversion.py) - * [Infix To Prefix Conversion](data_structures/stacks/infix_to_prefix_conversion.py) - * [Next Greater Element](data_structures/stacks/next_greater_element.py) - * [Postfix Evaluation](data_structures/stacks/postfix_evaluation.py) - * [Prefix Evaluation](data_structures/stacks/prefix_evaluation.py) - * [Stack](data_structures/stacks/stack.py) - * [Stack With Doubly Linked List](data_structures/stacks/stack_with_doubly_linked_list.py) - * [Stack With Singly Linked List](data_structures/stacks/stack_with_singly_linked_list.py) - * [Stock Span Problem](data_structures/stacks/stock_span_problem.py) - * Trie - * [Trie](data_structures/trie/trie.py) + +- Binary Tree + - [Avl Tree](data_structures/binary_tree/avl_tree.py) + - [Basic Binary Tree](data_structures/binary_tree/basic_binary_tree.py) + - [Binary Search Tree](data_structures/binary_tree/binary_search_tree.py) + - [Binary Search Tree Recursive](data_structures/binary_tree/binary_search_tree_recursive.py) + - [Binary Tree Mirror](data_structures/binary_tree/binary_tree_mirror.py) + - [Binary Tree Node Sum](data_structures/binary_tree/binary_tree_node_sum.py) + - [Binary Tree Traversals](data_structures/binary_tree/binary_tree_traversals.py) + - [Fenwick Tree](data_structures/binary_tree/fenwick_tree.py) + - [Inorder Tree Traversal 2022](data_structures/binary_tree/inorder_tree_traversal_2022.py) + - [Lazy Segment Tree](data_structures/binary_tree/lazy_segment_tree.py) + - [Lowest Common Ancestor](data_structures/binary_tree/lowest_common_ancestor.py) + - [Maximum Fenwick Tree](data_structures/binary_tree/maximum_fenwick_tree.py) + - [Merge Two Binary Trees](data_structures/binary_tree/merge_two_binary_trees.py) + - [Non Recursive Segment Tree](data_structures/binary_tree/non_recursive_segment_tree.py) + - [Number Of Possible Binary Trees](data_structures/binary_tree/number_of_possible_binary_trees.py) + - [Red Black Tree](data_structures/binary_tree/red_black_tree.py) + - [Segment Tree](data_structures/binary_tree/segment_tree.py) + - [Segment Tree Other](data_structures/binary_tree/segment_tree_other.py) + - [Treap](data_structures/binary_tree/treap.py) + - [Wavelet Tree](data_structures/binary_tree/wavelet_tree.py) +- Disjoint Set + - [Alternate Disjoint Set](data_structures/disjoint_set/alternate_disjoint_set.py) + - [Disjoint Set](data_structures/disjoint_set/disjoint_set.py) +- Hashing + - [Double Hash](data_structures/hashing/double_hash.py) + - [Hash Table](data_structures/hashing/hash_table.py) + - [Hash Table With Linked List](data_structures/hashing/hash_table_with_linked_list.py) + - Number Theory + - [Prime Numbers](data_structures/hashing/number_theory/prime_numbers.py) + - [Quadratic Probing](data_structures/hashing/quadratic_probing.py) +- Heap + - [Binomial Heap](data_structures/heap/binomial_heap.py) + - [Heap](data_structures/heap/heap.py) + - [Heap Generic](data_structures/heap/heap_generic.py) + - [Max Heap](data_structures/heap/max_heap.py) + - [Min Heap](data_structures/heap/min_heap.py) + - [Randomized Heap](data_structures/heap/randomized_heap.py) + - [Skew Heap](data_structures/heap/skew_heap.py) +- Linked List + - [Circular Linked List](data_structures/linked_list/circular_linked_list.py) + - [Deque Doubly](data_structures/linked_list/deque_doubly.py) + - [Doubly Linked List](data_structures/linked_list/doubly_linked_list.py) + - [Doubly Linked List Two](data_structures/linked_list/doubly_linked_list_two.py) + - [From Sequence](data_structures/linked_list/from_sequence.py) + - [Has Loop](data_structures/linked_list/has_loop.py) + - [Is Palindrome](data_structures/linked_list/is_palindrome.py) + - [Merge Two Lists](data_structures/linked_list/merge_two_lists.py) + - [Middle Element Of Linked List](data_structures/linked_list/middle_element_of_linked_list.py) + - [Print Reverse](data_structures/linked_list/print_reverse.py) + - [Singly Linked List](data_structures/linked_list/singly_linked_list.py) + - [Skip List](data_structures/linked_list/skip_list.py) + - [Swap Nodes](data_structures/linked_list/swap_nodes.py) +- Queue + - [Circular Queue](data_structures/queue/circular_queue.py) + - [Circular Queue Linked List](data_structures/queue/circular_queue_linked_list.py) + - [Double Ended Queue](data_structures/queue/double_ended_queue.py) + - [Linked Queue](data_structures/queue/linked_queue.py) + - [Priority Queue Using List](data_structures/queue/priority_queue_using_list.py) + - [Queue On List](data_structures/queue/queue_on_list.py) + - [Queue On Pseudo Stack](data_structures/queue/queue_on_pseudo_stack.py) +- Stacks + - [Balanced Parentheses](data_structures/stacks/balanced_parentheses.py) + - [Dijkstras Two Stack Algorithm](data_structures/stacks/dijkstras_two_stack_algorithm.py) + - [Evaluate Postfix Notations](data_structures/stacks/evaluate_postfix_notations.py) + - [Infix To Postfix Conversion](data_structures/stacks/infix_to_postfix_conversion.py) + - [Infix To Prefix Conversion](data_structures/stacks/infix_to_prefix_conversion.py) + - [Next Greater Element](data_structures/stacks/next_greater_element.py) + - [Postfix Evaluation](data_structures/stacks/postfix_evaluation.py) + - [Prefix Evaluation](data_structures/stacks/prefix_evaluation.py) + - [Stack](data_structures/stacks/stack.py) + - [Stack With Doubly Linked List](data_structures/stacks/stack_with_doubly_linked_list.py) + - [Stack With Singly Linked List](data_structures/stacks/stack_with_singly_linked_list.py) + - [Stock Span Problem](data_structures/stacks/stock_span_problem.py) +- Trie + - [Trie](data_structures/trie/trie.py) ## Digital Image Processing - * [Change Brightness](digital_image_processing/change_brightness.py) - * [Change Contrast](digital_image_processing/change_contrast.py) - * [Convert To Negative](digital_image_processing/convert_to_negative.py) - * Dithering - * [Burkes](digital_image_processing/dithering/burkes.py) - * Edge Detection - * [Canny](digital_image_processing/edge_detection/canny.py) - * Filters - * [Bilateral Filter](digital_image_processing/filters/bilateral_filter.py) - * [Convolve](digital_image_processing/filters/convolve.py) - * [Gabor Filter](digital_image_processing/filters/gabor_filter.py) - * [Gaussian Filter](digital_image_processing/filters/gaussian_filter.py) - * [Local Binary Pattern](digital_image_processing/filters/local_binary_pattern.py) - * [Median Filter](digital_image_processing/filters/median_filter.py) - * [Sobel Filter](digital_image_processing/filters/sobel_filter.py) - * Histogram Equalization - * [Histogram Stretch](digital_image_processing/histogram_equalization/histogram_stretch.py) - * [Index Calculation](digital_image_processing/index_calculation.py) - * Morphological Operations - * [Dilation Operation](digital_image_processing/morphological_operations/dilation_operation.py) - * [Erosion Operation](digital_image_processing/morphological_operations/erosion_operation.py) - * Resize - * [Resize](digital_image_processing/resize/resize.py) - * Rotation - * [Rotation](digital_image_processing/rotation/rotation.py) - * [Sepia](digital_image_processing/sepia.py) - * [Test Digital Image Processing](digital_image_processing/test_digital_image_processing.py) + +- [Change Brightness](digital_image_processing/change_brightness.py) +- [Change Contrast](digital_image_processing/change_contrast.py) +- [Convert To Negative](digital_image_processing/convert_to_negative.py) +- Dithering + - [Burkes](digital_image_processing/dithering/burkes.py) +- Edge Detection + - [Canny](digital_image_processing/edge_detection/canny.py) +- Filters + - [Bilateral Filter](digital_image_processing/filters/bilateral_filter.py) + - [Convolve](digital_image_processing/filters/convolve.py) + - [Gabor Filter](digital_image_processing/filters/gabor_filter.py) + - [Gaussian Filter](digital_image_processing/filters/gaussian_filter.py) + - [Local Binary Pattern](digital_image_processing/filters/local_binary_pattern.py) + - [Median Filter](digital_image_processing/filters/median_filter.py) + - [Sobel Filter](digital_image_processing/filters/sobel_filter.py) +- Histogram Equalization + - [Histogram Stretch](digital_image_processing/histogram_equalization/histogram_stretch.py) +- [Index Calculation](digital_image_processing/index_calculation.py) +- Morphological Operations + - [Dilation Operation](digital_image_processing/morphological_operations/dilation_operation.py) + - [Erosion Operation](digital_image_processing/morphological_operations/erosion_operation.py) +- Resize + - [Resize](digital_image_processing/resize/resize.py) +- Rotation + - [Rotation](digital_image_processing/rotation/rotation.py) +- [Sepia](digital_image_processing/sepia.py) +- [Test Digital Image Processing](digital_image_processing/test_digital_image_processing.py) ## Divide And Conquer - * [Closest Pair Of Points](divide_and_conquer/closest_pair_of_points.py) - * [Convex Hull](divide_and_conquer/convex_hull.py) - * [Heaps Algorithm](divide_and_conquer/heaps_algorithm.py) - * [Heaps Algorithm Iterative](divide_and_conquer/heaps_algorithm_iterative.py) - * [Inversions](divide_and_conquer/inversions.py) - * [Kth Order Statistic](divide_and_conquer/kth_order_statistic.py) - * [Max Difference Pair](divide_and_conquer/max_difference_pair.py) - * [Max Subarray Sum](divide_and_conquer/max_subarray_sum.py) - * [Mergesort](divide_and_conquer/mergesort.py) - * [Peak](divide_and_conquer/peak.py) - * [Power](divide_and_conquer/power.py) - * [Strassen Matrix Multiplication](divide_and_conquer/strassen_matrix_multiplication.py) + +- [Closest Pair Of Points](divide_and_conquer/closest_pair_of_points.py) +- [Convex Hull](divide_and_conquer/convex_hull.py) +- [Heaps Algorithm](divide_and_conquer/heaps_algorithm.py) +- [Heaps Algorithm Iterative](divide_and_conquer/heaps_algorithm_iterative.py) +- [Inversions](divide_and_conquer/inversions.py) +- [Kth Order Statistic](divide_and_conquer/kth_order_statistic.py) +- [Max Difference Pair](divide_and_conquer/max_difference_pair.py) +- [Max Subarray Sum](divide_and_conquer/max_subarray_sum.py) +- [Mergesort](divide_and_conquer/mergesort.py) +- [Peak](divide_and_conquer/peak.py) +- [Power](divide_and_conquer/power.py) +- [Strassen Matrix Multiplication](divide_and_conquer/strassen_matrix_multiplication.py) ## Dynamic Programming - * [Abbreviation](dynamic_programming/abbreviation.py) - * [All Construct](dynamic_programming/all_construct.py) - * [Bitmask](dynamic_programming/bitmask.py) - * [Catalan Numbers](dynamic_programming/catalan_numbers.py) - * [Climbing Stairs](dynamic_programming/climbing_stairs.py) - * [Edit Distance](dynamic_programming/edit_distance.py) - * [Factorial](dynamic_programming/factorial.py) - * [Fast Fibonacci](dynamic_programming/fast_fibonacci.py) - * [Fibonacci](dynamic_programming/fibonacci.py) - * [Floyd Warshall](dynamic_programming/floyd_warshall.py) - * [Fractional Knapsack](dynamic_programming/fractional_knapsack.py) - * [Fractional Knapsack 2](dynamic_programming/fractional_knapsack_2.py) - * [Integer Partition](dynamic_programming/integer_partition.py) - * [Iterating Through Submasks](dynamic_programming/iterating_through_submasks.py) - * [Knapsack](dynamic_programming/knapsack.py) - * [Longest Common Subsequence](dynamic_programming/longest_common_subsequence.py) - * [Longest Increasing Subsequence](dynamic_programming/longest_increasing_subsequence.py) - * [Longest Increasing Subsequence O(Nlogn)](dynamic_programming/longest_increasing_subsequence_o(nlogn).py) - * [Longest Sub Array](dynamic_programming/longest_sub_array.py) - * [Matrix Chain Order](dynamic_programming/matrix_chain_order.py) - * [Max Non Adjacent Sum](dynamic_programming/max_non_adjacent_sum.py) - * [Max Sub Array](dynamic_programming/max_sub_array.py) - * [Max Sum Contiguous Subsequence](dynamic_programming/max_sum_contiguous_subsequence.py) - * [Minimum Coin Change](dynamic_programming/minimum_coin_change.py) - * [Minimum Cost Path](dynamic_programming/minimum_cost_path.py) - * [Minimum Partition](dynamic_programming/minimum_partition.py) - * [Minimum Steps To One](dynamic_programming/minimum_steps_to_one.py) - * [Optimal Binary Search Tree](dynamic_programming/optimal_binary_search_tree.py) - * [Rod Cutting](dynamic_programming/rod_cutting.py) - * [Subset Generation](dynamic_programming/subset_generation.py) - * [Sum Of Subset](dynamic_programming/sum_of_subset.py) + +- [Abbreviation](dynamic_programming/abbreviation.py) +- [All Construct](dynamic_programming/all_construct.py) +- [Bitmask](dynamic_programming/bitmask.py) +- [Catalan Numbers](dynamic_programming/catalan_numbers.py) +- [Climbing Stairs](dynamic_programming/climbing_stairs.py) +- [Edit Distance](dynamic_programming/edit_distance.py) +- [Factorial](dynamic_programming/factorial.py) +- [Fast Fibonacci](dynamic_programming/fast_fibonacci.py) +- [Fibonacci](dynamic_programming/fibonacci.py) +- [Floyd Warshall](dynamic_programming/floyd_warshall.py) +- [Fractional Knapsack](dynamic_programming/fractional_knapsack.py) +- [Fractional Knapsack 2](dynamic_programming/fractional_knapsack_2.py) +- [Integer Partition](dynamic_programming/integer_partition.py) +- [Iterating Through Submasks](dynamic_programming/iterating_through_submasks.py) +- [Knapsack](dynamic_programming/knapsack.py) +- [Longest Common Subsequence](dynamic_programming/longest_common_subsequence.py) +- [Longest Increasing Subsequence](dynamic_programming/longest_increasing_subsequence.py) +- [Longest Increasing Subsequence O(Nlogn)]() +- [Longest Sub Array](dynamic_programming/longest_sub_array.py) +- [Matrix Chain Order](dynamic_programming/matrix_chain_order.py) +- [Max Non Adjacent Sum](dynamic_programming/max_non_adjacent_sum.py) +- [Max Sub Array](dynamic_programming/max_sub_array.py) +- [Max Sum Contiguous Subsequence](dynamic_programming/max_sum_contiguous_subsequence.py) +- [Minimum Coin Change](dynamic_programming/minimum_coin_change.py) +- [Minimum Cost Path](dynamic_programming/minimum_cost_path.py) +- [Minimum Partition](dynamic_programming/minimum_partition.py) +- [Minimum Steps To One](dynamic_programming/minimum_steps_to_one.py) +- [Optimal Binary Search Tree](dynamic_programming/optimal_binary_search_tree.py) +- [Rod Cutting](dynamic_programming/rod_cutting.py) +- [Subset Generation](dynamic_programming/subset_generation.py) +- [Sum Of Subset](dynamic_programming/sum_of_subset.py) ## Electronics - * [Carrier Concentration](electronics/carrier_concentration.py) - * [Coulombs Law](electronics/coulombs_law.py) - * [Electric Power](electronics/electric_power.py) - * [Ohms Law](electronics/ohms_law.py) + +- [Carrier Concentration](electronics/carrier_concentration.py) +- [Coulombs Law](electronics/coulombs_law.py) +- [Electric Power](electronics/electric_power.py) +- [Ohms Law](electronics/ohms_law.py) ## File Transfer - * [Receive File](file_transfer/receive_file.py) - * [Send File](file_transfer/send_file.py) - * Tests - * [Test Send File](file_transfer/tests/test_send_file.py) + +- [Receive File](file_transfer/receive_file.py) +- [Send File](file_transfer/send_file.py) +- Tests + - [Test Send File](file_transfer/tests/test_send_file.py) ## Financial - * [Equated Monthly Installments](financial/equated_monthly_installments.py) - * [Interest](financial/interest.py) + +- [Equated Monthly Installments](financial/equated_monthly_installments.py) +- [Interest](financial/interest.py) ## Fractals - * [Julia Sets](fractals/julia_sets.py) - * [Koch Snowflake](fractals/koch_snowflake.py) - * [Mandelbrot](fractals/mandelbrot.py) - * [Sierpinski Triangle](fractals/sierpinski_triangle.py) + +- [Julia Sets](fractals/julia_sets.py) +- [Koch Snowflake](fractals/koch_snowflake.py) +- [Mandelbrot](fractals/mandelbrot.py) +- [Sierpinski Triangle](fractals/sierpinski_triangle.py) ## Fuzzy Logic - * [Fuzzy Operations](fuzzy_logic/fuzzy_operations.py) + +- [Fuzzy Operations](fuzzy_logic/fuzzy_operations.py) ## Genetic Algorithm - * [Basic String](genetic_algorithm/basic_string.py) + +- [Basic String](genetic_algorithm/basic_string.py) ## Geodesy - * [Haversine Distance](geodesy/haversine_distance.py) - * [Lamberts Ellipsoidal Distance](geodesy/lamberts_ellipsoidal_distance.py) + +- [Haversine Distance](geodesy/haversine_distance.py) +- [Lamberts Ellipsoidal Distance](geodesy/lamberts_ellipsoidal_distance.py) ## Graphics - * [Bezier Curve](graphics/bezier_curve.py) - * [Vector3 For 2D Rendering](graphics/vector3_for_2d_rendering.py) + +- [Bezier Curve](graphics/bezier_curve.py) +- [Vector3 For 2D Rendering](graphics/vector3_for_2d_rendering.py) ## Graphs - * [A Star](graphs/a_star.py) - * [Articulation Points](graphs/articulation_points.py) - * [Basic Graphs](graphs/basic_graphs.py) - * [Bellman Ford](graphs/bellman_ford.py) - * [Bfs Shortest Path](graphs/bfs_shortest_path.py) - * [Bfs Zero One Shortest Path](graphs/bfs_zero_one_shortest_path.py) - * [Bidirectional A Star](graphs/bidirectional_a_star.py) - * [Bidirectional Breadth First Search](graphs/bidirectional_breadth_first_search.py) - * [Boruvka](graphs/boruvka.py) - * [Breadth First Search](graphs/breadth_first_search.py) - * [Breadth First Search 2](graphs/breadth_first_search_2.py) - * [Breadth First Search Shortest Path](graphs/breadth_first_search_shortest_path.py) - * [Check Bipartite Graph Bfs](graphs/check_bipartite_graph_bfs.py) - * [Check Bipartite Graph Dfs](graphs/check_bipartite_graph_dfs.py) - * [Check Cycle](graphs/check_cycle.py) - * [Connected Components](graphs/connected_components.py) - * [Depth First Search](graphs/depth_first_search.py) - * [Depth First Search 2](graphs/depth_first_search_2.py) - * [Dijkstra](graphs/dijkstra.py) - * [Dijkstra 2](graphs/dijkstra_2.py) - * [Dijkstra Algorithm](graphs/dijkstra_algorithm.py) - * [Dinic](graphs/dinic.py) - * [Directed And Undirected (Weighted) Graph](graphs/directed_and_undirected_(weighted)_graph.py) - * [Edmonds Karp Multiple Source And Sink](graphs/edmonds_karp_multiple_source_and_sink.py) - * [Eulerian Path And Circuit For Undirected Graph](graphs/eulerian_path_and_circuit_for_undirected_graph.py) - * [Even Tree](graphs/even_tree.py) - * [Finding Bridges](graphs/finding_bridges.py) - * [Frequent Pattern Graph Miner](graphs/frequent_pattern_graph_miner.py) - * [G Topological Sort](graphs/g_topological_sort.py) - * [Gale Shapley Bigraph](graphs/gale_shapley_bigraph.py) - * [Graph List](graphs/graph_list.py) - * [Graph Matrix](graphs/graph_matrix.py) - * [Graphs Floyd Warshall](graphs/graphs_floyd_warshall.py) - * [Greedy Best First](graphs/greedy_best_first.py) - * [Greedy Min Vertex Cover](graphs/greedy_min_vertex_cover.py) - * [Kahns Algorithm Long](graphs/kahns_algorithm_long.py) - * [Kahns Algorithm Topo](graphs/kahns_algorithm_topo.py) - * [Karger](graphs/karger.py) - * [Markov Chain](graphs/markov_chain.py) - * [Matching Min Vertex Cover](graphs/matching_min_vertex_cover.py) - * [Minimum Path Sum](graphs/minimum_path_sum.py) - * [Minimum Spanning Tree Boruvka](graphs/minimum_spanning_tree_boruvka.py) - * [Minimum Spanning Tree Kruskal](graphs/minimum_spanning_tree_kruskal.py) - * [Minimum Spanning Tree Kruskal2](graphs/minimum_spanning_tree_kruskal2.py) - * [Minimum Spanning Tree Prims](graphs/minimum_spanning_tree_prims.py) - * [Minimum Spanning Tree Prims2](graphs/minimum_spanning_tree_prims2.py) - * [Multi Heuristic Astar](graphs/multi_heuristic_astar.py) - * [Page Rank](graphs/page_rank.py) - * [Prim](graphs/prim.py) - * [Random Graph Generator](graphs/random_graph_generator.py) - * [Scc Kosaraju](graphs/scc_kosaraju.py) - * [Strongly Connected Components](graphs/strongly_connected_components.py) - * [Tarjans Scc](graphs/tarjans_scc.py) - * Tests - * [Test Min Spanning Tree Kruskal](graphs/tests/test_min_spanning_tree_kruskal.py) - * [Test Min Spanning Tree Prim](graphs/tests/test_min_spanning_tree_prim.py) + +- [A Star](graphs/a_star.py) +- [Articulation Points](graphs/articulation_points.py) +- [Basic Graphs](graphs/basic_graphs.py) +- [Bellman Ford](graphs/bellman_ford.py) +- [Bfs Shortest Path](graphs/bfs_shortest_path.py) +- [Bfs Zero One Shortest Path](graphs/bfs_zero_one_shortest_path.py) +- [Bidirectional A Star](graphs/bidirectional_a_star.py) +- [Bidirectional Breadth First Search](graphs/bidirectional_breadth_first_search.py) +- [Boruvka](graphs/boruvka.py) +- [Breadth First Search](graphs/breadth_first_search.py) +- [Breadth First Search 2](graphs/breadth_first_search_2.py) +- [Breadth First Search Shortest Path](graphs/breadth_first_search_shortest_path.py) +- [Check Bipartite Graph Bfs](graphs/check_bipartite_graph_bfs.py) +- [Check Bipartite Graph Dfs](graphs/check_bipartite_graph_dfs.py) +- [Check Cycle](graphs/check_cycle.py) +- [Connected Components](graphs/connected_components.py) +- [Depth First Search](graphs/depth_first_search.py) +- [Depth First Search 2](graphs/depth_first_search_2.py) +- [Dijkstra](graphs/dijkstra.py) +- [Dijkstra 2](graphs/dijkstra_2.py) +- [Dijkstra Algorithm](graphs/dijkstra_algorithm.py) +- [Dinic](graphs/dinic.py) +- [Directed And Undirected (Weighted) Graph]() +- [Edmonds Karp Multiple Source And Sink](graphs/edmonds_karp_multiple_source_and_sink.py) +- [Eulerian Path And Circuit For Undirected Graph](graphs/eulerian_path_and_circuit_for_undirected_graph.py) +- [Even Tree](graphs/even_tree.py) +- [Finding Bridges](graphs/finding_bridges.py) +- [Frequent Pattern Graph Miner](graphs/frequent_pattern_graph_miner.py) +- [G Topological Sort](graphs/g_topological_sort.py) +- [Gale Shapley Bigraph](graphs/gale_shapley_bigraph.py) +- [Graph List](graphs/graph_list.py) +- [Graph Matrix](graphs/graph_matrix.py) +- [Graphs Floyd Warshall](graphs/graphs_floyd_warshall.py) +- [Greedy Best First](graphs/greedy_best_first.py) +- [Greedy Min Vertex Cover](graphs/greedy_min_vertex_cover.py) +- [Kahns Algorithm Long](graphs/kahns_algorithm_long.py) +- [Kahns Algorithm Topo](graphs/kahns_algorithm_topo.py) +- [Karger](graphs/karger.py) +- [Markov Chain](graphs/markov_chain.py) +- [Matching Min Vertex Cover](graphs/matching_min_vertex_cover.py) +- [Minimum Path Sum](graphs/minimum_path_sum.py) +- [Minimum Spanning Tree Boruvka](graphs/minimum_spanning_tree_boruvka.py) +- [Minimum Spanning Tree Kruskal](graphs/minimum_spanning_tree_kruskal.py) +- [Minimum Spanning Tree Kruskal2](graphs/minimum_spanning_tree_kruskal2.py) +- [Minimum Spanning Tree Prims](graphs/minimum_spanning_tree_prims.py) +- [Minimum Spanning Tree Prims2](graphs/minimum_spanning_tree_prims2.py) +- [Multi Heuristic Astar](graphs/multi_heuristic_astar.py) +- [Page Rank](graphs/page_rank.py) +- [Prim](graphs/prim.py) +- [Random Graph Generator](graphs/random_graph_generator.py) +- [Scc Kosaraju](graphs/scc_kosaraju.py) +- [Strongly Connected Components](graphs/strongly_connected_components.py) +- [Tarjans Scc](graphs/tarjans_scc.py) +- Tests + - [Test Min Spanning Tree Kruskal](graphs/tests/test_min_spanning_tree_kruskal.py) + - [Test Min Spanning Tree Prim](graphs/tests/test_min_spanning_tree_prim.py) ## Greedy Methods - * [Optimal Merge Pattern](greedy_methods/optimal_merge_pattern.py) + +- [Optimal Merge Pattern](greedy_methods/optimal_merge_pattern.py) ## Hashes - * [Adler32](hashes/adler32.py) - * [Chaos Machine](hashes/chaos_machine.py) - * [Djb2](hashes/djb2.py) - * [Enigma Machine](hashes/enigma_machine.py) - * [Hamming Code](hashes/hamming_code.py) - * [Luhn](hashes/luhn.py) - * [Md5](hashes/md5.py) - * [Sdbm](hashes/sdbm.py) - * [Sha1](hashes/sha1.py) - * [Sha256](hashes/sha256.py) + +- [Adler32](hashes/adler32.py) +- [Chaos Machine](hashes/chaos_machine.py) +- [Djb2](hashes/djb2.py) +- [Enigma Machine](hashes/enigma_machine.py) +- [Hamming Code](hashes/hamming_code.py) +- [Luhn](hashes/luhn.py) +- [Md5](hashes/md5.py) +- [Sdbm](hashes/sdbm.py) +- [Sha1](hashes/sha1.py) +- [Sha256](hashes/sha256.py) ## Knapsack - * [Greedy Knapsack](knapsack/greedy_knapsack.py) - * [Knapsack](knapsack/knapsack.py) - * Tests - * [Test Greedy Knapsack](knapsack/tests/test_greedy_knapsack.py) - * [Test Knapsack](knapsack/tests/test_knapsack.py) + +- [Greedy Knapsack](knapsack/greedy_knapsack.py) +- [Knapsack](knapsack/knapsack.py) +- Tests + - [Test Greedy Knapsack](knapsack/tests/test_greedy_knapsack.py) + - [Test Knapsack](knapsack/tests/test_knapsack.py) ## Linear Algebra - * Src - * [Conjugate Gradient](linear_algebra/src/conjugate_gradient.py) - * [Lib](linear_algebra/src/lib.py) - * [Polynom For Points](linear_algebra/src/polynom_for_points.py) - * [Power Iteration](linear_algebra/src/power_iteration.py) - * [Rayleigh Quotient](linear_algebra/src/rayleigh_quotient.py) - * [Schur Complement](linear_algebra/src/schur_complement.py) - * [Test Linear Algebra](linear_algebra/src/test_linear_algebra.py) - * [Transformations 2D](linear_algebra/src/transformations_2d.py) + +- Src + - [Conjugate Gradient](linear_algebra/src/conjugate_gradient.py) + - [Lib](linear_algebra/src/lib.py) + - [Polynom For Points](linear_algebra/src/polynom_for_points.py) + - [Power Iteration](linear_algebra/src/power_iteration.py) + - [Rayleigh Quotient](linear_algebra/src/rayleigh_quotient.py) + - [Schur Complement](linear_algebra/src/schur_complement.py) + - [Test Linear Algebra](linear_algebra/src/test_linear_algebra.py) + - [Transformations 2D](linear_algebra/src/transformations_2d.py) ## Machine Learning - * [Astar](machine_learning/astar.py) - * [Data Transformations](machine_learning/data_transformations.py) - * [Decision Tree](machine_learning/decision_tree.py) - * Forecasting - * [Run](machine_learning/forecasting/run.py) - * [Gaussian Naive Bayes](machine_learning/gaussian_naive_bayes.py) - * [Gradient Boosting Regressor](machine_learning/gradient_boosting_regressor.py) - * [Gradient Descent](machine_learning/gradient_descent.py) - * [K Means Clust](machine_learning/k_means_clust.py) - * [K Nearest Neighbours](machine_learning/k_nearest_neighbours.py) - * [Knn Sklearn](machine_learning/knn_sklearn.py) - * [Linear Discriminant Analysis](machine_learning/linear_discriminant_analysis.py) - * [Linear Regression](machine_learning/linear_regression.py) - * Local Weighted Learning - * [Local Weighted Learning](machine_learning/local_weighted_learning/local_weighted_learning.py) - * [Logistic Regression](machine_learning/logistic_regression.py) - * Lstm - * [Lstm Prediction](machine_learning/lstm/lstm_prediction.py) - * [Multilayer Perceptron Classifier](machine_learning/multilayer_perceptron_classifier.py) - * [Polymonial Regression](machine_learning/polymonial_regression.py) - * [Random Forest Classifier](machine_learning/random_forest_classifier.py) - * [Random Forest Regressor](machine_learning/random_forest_regressor.py) - * [Scoring Functions](machine_learning/scoring_functions.py) - * [Self Organizing Map](machine_learning/self_organizing_map.py) - * [Sequential Minimum Optimization](machine_learning/sequential_minimum_optimization.py) - * [Similarity Search](machine_learning/similarity_search.py) - * [Support Vector Machines](machine_learning/support_vector_machines.py) - * [Word Frequency Functions](machine_learning/word_frequency_functions.py) + +- [Astar](machine_learning/astar.py) +- [Data Transformations](machine_learning/data_transformations.py) +- [Decision Tree](machine_learning/decision_tree.py) +- Forecasting + - [Run](machine_learning/forecasting/run.py) +- [Gaussian Naive Bayes](machine_learning/gaussian_naive_bayes.py) +- [Gradient Boosting Regressor](machine_learning/gradient_boosting_regressor.py) +- [Gradient Descent](machine_learning/gradient_descent.py) +- [K Means Clust](machine_learning/k_means_clust.py) +- [K Nearest Neighbours](machine_learning/k_nearest_neighbours.py) +- [Knn Sklearn](machine_learning/knn_sklearn.py) +- [Linear Discriminant Analysis](machine_learning/linear_discriminant_analysis.py) +- [Linear Regression](machine_learning/linear_regression.py) +- Local Weighted Learning + - [Local Weighted Learning](machine_learning/local_weighted_learning/local_weighted_learning.py) +- [Logistic Regression](machine_learning/logistic_regression.py) +- Lstm + - [Lstm Prediction](machine_learning/lstm/lstm_prediction.py) +- [Multilayer Perceptron Classifier](machine_learning/multilayer_perceptron_classifier.py) +- [Polymonial Regression](machine_learning/polymonial_regression.py) +- [Random Forest Classifier](machine_learning/random_forest_classifier.py) +- [Random Forest Regressor](machine_learning/random_forest_regressor.py) +- [Scoring Functions](machine_learning/scoring_functions.py) +- [Self Organizing Map](machine_learning/self_organizing_map.py) +- [Sequential Minimum Optimization](machine_learning/sequential_minimum_optimization.py) +- [Similarity Search](machine_learning/similarity_search.py) +- [Support Vector Machines](machine_learning/support_vector_machines.py) +- [Word Frequency Functions](machine_learning/word_frequency_functions.py) ## Maths - * [3N Plus 1](maths/3n_plus_1.py) - * [Abs](maths/abs.py) - * [Abs Max](maths/abs_max.py) - * [Abs Min](maths/abs_min.py) - * [Add](maths/add.py) - * [Aliquot Sum](maths/aliquot_sum.py) - * [Allocation Number](maths/allocation_number.py) - * [Area](maths/area.py) - * [Area Under Curve](maths/area_under_curve.py) - * [Armstrong Numbers](maths/armstrong_numbers.py) - * [Average Absolute Deviation](maths/average_absolute_deviation.py) - * [Average Mean](maths/average_mean.py) - * [Average Median](maths/average_median.py) - * [Average Mode](maths/average_mode.py) - * [Bailey Borwein Plouffe](maths/bailey_borwein_plouffe.py) - * [Basic Maths](maths/basic_maths.py) - * [Binary Exp Mod](maths/binary_exp_mod.py) - * [Binary Exponentiation](maths/binary_exponentiation.py) - * [Binary Exponentiation 2](maths/binary_exponentiation_2.py) - * [Binary Exponentiation 3](maths/binary_exponentiation_3.py) - * [Binomial Coefficient](maths/binomial_coefficient.py) - * [Binomial Distribution](maths/binomial_distribution.py) - * [Bisection](maths/bisection.py) - * [Carmichael Number](maths/carmichael_number.py) - * [Catalan Number](maths/catalan_number.py) - * [Ceil](maths/ceil.py) - * [Check Polygon](maths/check_polygon.py) - * [Chudnovsky Algorithm](maths/chudnovsky_algorithm.py) - * [Collatz Sequence](maths/collatz_sequence.py) - * [Combinations](maths/combinations.py) - * [Decimal Isolate](maths/decimal_isolate.py) - * [Double Factorial Iterative](maths/double_factorial_iterative.py) - * [Double Factorial Recursive](maths/double_factorial_recursive.py) - * [Entropy](maths/entropy.py) - * [Euclidean Distance](maths/euclidean_distance.py) - * [Euclidean Gcd](maths/euclidean_gcd.py) - * [Euler Method](maths/euler_method.py) - * [Euler Modified](maths/euler_modified.py) - * [Eulers Totient](maths/eulers_totient.py) - * [Extended Euclidean Algorithm](maths/extended_euclidean_algorithm.py) - * [Factorial Iterative](maths/factorial_iterative.py) - * [Factorial Recursive](maths/factorial_recursive.py) - * [Factors](maths/factors.py) - * [Fermat Little Theorem](maths/fermat_little_theorem.py) - * [Fibonacci](maths/fibonacci.py) - * [Find Max](maths/find_max.py) - * [Find Max Recursion](maths/find_max_recursion.py) - * [Find Min](maths/find_min.py) - * [Find Min Recursion](maths/find_min_recursion.py) - * [Floor](maths/floor.py) - * [Gamma](maths/gamma.py) - * [Gamma Recursive](maths/gamma_recursive.py) - * [Gaussian](maths/gaussian.py) - * [Greatest Common Divisor](maths/greatest_common_divisor.py) - * [Greedy Coin Change](maths/greedy_coin_change.py) - * [Hamming Numbers](maths/hamming_numbers.py) - * [Hardy Ramanujanalgo](maths/hardy_ramanujanalgo.py) - * [Integration By Simpson Approx](maths/integration_by_simpson_approx.py) - * [Is Ip V4 Address Valid](maths/is_ip_v4_address_valid.py) - * [Is Square Free](maths/is_square_free.py) - * [Jaccard Similarity](maths/jaccard_similarity.py) - * [Kadanes](maths/kadanes.py) - * [Karatsuba](maths/karatsuba.py) - * [Krishnamurthy Number](maths/krishnamurthy_number.py) - * [Kth Lexicographic Permutation](maths/kth_lexicographic_permutation.py) - * [Largest Of Very Large Numbers](maths/largest_of_very_large_numbers.py) - * [Largest Subarray Sum](maths/largest_subarray_sum.py) - * [Least Common Multiple](maths/least_common_multiple.py) - * [Line Length](maths/line_length.py) - * [Lucas Lehmer Primality Test](maths/lucas_lehmer_primality_test.py) - * [Lucas Series](maths/lucas_series.py) - * [Matrix Exponentiation](maths/matrix_exponentiation.py) - * [Max Sum Sliding Window](maths/max_sum_sliding_window.py) - * [Median Of Two Arrays](maths/median_of_two_arrays.py) - * [Miller Rabin](maths/miller_rabin.py) - * [Mobius Function](maths/mobius_function.py) - * [Modular Exponential](maths/modular_exponential.py) - * [Monte Carlo](maths/monte_carlo.py) - * [Monte Carlo Dice](maths/monte_carlo_dice.py) - * [Nevilles Method](maths/nevilles_method.py) - * [Newton Raphson](maths/newton_raphson.py) - * [Number Of Digits](maths/number_of_digits.py) - * [Numerical Integration](maths/numerical_integration.py) - * [Perfect Cube](maths/perfect_cube.py) - * [Perfect Number](maths/perfect_number.py) - * [Perfect Square](maths/perfect_square.py) - * [Persistence](maths/persistence.py) - * [Pi Monte Carlo Estimation](maths/pi_monte_carlo_estimation.py) - * [Points Are Collinear 3D](maths/points_are_collinear_3d.py) - * [Pollard Rho](maths/pollard_rho.py) - * [Polynomial Evaluation](maths/polynomial_evaluation.py) - * [Power Using Recursion](maths/power_using_recursion.py) - * [Prime Check](maths/prime_check.py) - * [Prime Factors](maths/prime_factors.py) - * [Prime Numbers](maths/prime_numbers.py) - * [Prime Sieve Eratosthenes](maths/prime_sieve_eratosthenes.py) - * [Primelib](maths/primelib.py) - * [Proth Number](maths/proth_number.py) - * [Pythagoras](maths/pythagoras.py) - * [Qr Decomposition](maths/qr_decomposition.py) - * [Quadratic Equations Complex Numbers](maths/quadratic_equations_complex_numbers.py) - * [Radians](maths/radians.py) - * [Radix2 Fft](maths/radix2_fft.py) - * [Relu](maths/relu.py) - * [Runge Kutta](maths/runge_kutta.py) - * [Segmented Sieve](maths/segmented_sieve.py) - * Series - * [Arithmetic](maths/series/arithmetic.py) - * [Geometric](maths/series/geometric.py) - * [Geometric Series](maths/series/geometric_series.py) - * [Harmonic](maths/series/harmonic.py) - * [Harmonic Series](maths/series/harmonic_series.py) - * [Hexagonal Numbers](maths/series/hexagonal_numbers.py) - * [P Series](maths/series/p_series.py) - * [Sieve Of Eratosthenes](maths/sieve_of_eratosthenes.py) - * [Sigmoid](maths/sigmoid.py) - * [Simpson Rule](maths/simpson_rule.py) - * [Sin](maths/sin.py) - * [Sock Merchant](maths/sock_merchant.py) - * [Softmax](maths/softmax.py) - * [Square Root](maths/square_root.py) - * [Sum Of Arithmetic Series](maths/sum_of_arithmetic_series.py) - * [Sum Of Digits](maths/sum_of_digits.py) - * [Sum Of Geometric Progression](maths/sum_of_geometric_progression.py) - * [Sylvester Sequence](maths/sylvester_sequence.py) - * [Test Prime Check](maths/test_prime_check.py) - * [Trapezoidal Rule](maths/trapezoidal_rule.py) - * [Triplet Sum](maths/triplet_sum.py) - * [Two Pointer](maths/two_pointer.py) - * [Two Sum](maths/two_sum.py) - * [Ugly Numbers](maths/ugly_numbers.py) - * [Volume](maths/volume.py) - * [Weird Number](maths/weird_number.py) - * [Zellers Congruence](maths/zellers_congruence.py) + +- [3N Plus 1](maths/3n_plus_1.py) +- [Abs](maths/abs.py) +- [Abs Max](maths/abs_max.py) +- [Abs Min](maths/abs_min.py) +- [Add](maths/add.py) +- [Aliquot Sum](maths/aliquot_sum.py) +- [Allocation Number](maths/allocation_number.py) +- [Area](maths/area.py) +- [Area Under Curve](maths/area_under_curve.py) +- [Armstrong Numbers](maths/armstrong_numbers.py) +- [Average Absolute Deviation](maths/average_absolute_deviation.py) +- [Average Mean](maths/average_mean.py) +- [Average Median](maths/average_median.py) +- [Average Mode](maths/average_mode.py) +- [Bailey Borwein Plouffe](maths/bailey_borwein_plouffe.py) +- [Basic Maths](maths/basic_maths.py) +- [Binary Exp Mod](maths/binary_exp_mod.py) +- [Binary Exponentiation](maths/binary_exponentiation.py) +- [Binary Exponentiation 2](maths/binary_exponentiation_2.py) +- [Binary Exponentiation 3](maths/binary_exponentiation_3.py) +- [Binomial Coefficient](maths/binomial_coefficient.py) +- [Binomial Distribution](maths/binomial_distribution.py) +- [Bisection](maths/bisection.py) +- [Carmichael Number](maths/carmichael_number.py) +- [Catalan Number](maths/catalan_number.py) +- [Ceil](maths/ceil.py) +- [Check Polygon](maths/check_polygon.py) +- [Chudnovsky Algorithm](maths/chudnovsky_algorithm.py) +- [Collatz Sequence](maths/collatz_sequence.py) +- [Combinations](maths/combinations.py) +- [Decimal Isolate](maths/decimal_isolate.py) +- [Double Factorial Iterative](maths/double_factorial_iterative.py) +- [Double Factorial Recursive](maths/double_factorial_recursive.py) +- [Entropy](maths/entropy.py) +- [Euclidean Distance](maths/euclidean_distance.py) +- [Euclidean Gcd](maths/euclidean_gcd.py) +- [Euler Method](maths/euler_method.py) +- [Euler Modified](maths/euler_modified.py) +- [Eulers Totient](maths/eulers_totient.py) +- [Extended Euclidean Algorithm](maths/extended_euclidean_algorithm.py) +- [Factorial Iterative](maths/factorial_iterative.py) +- [Factorial Recursive](maths/factorial_recursive.py) +- [Factors](maths/factors.py) +- [Fermat Little Theorem](maths/fermat_little_theorem.py) +- [Fibonacci](maths/fibonacci.py) +- [Find Max](maths/find_max.py) +- [Find Max Recursion](maths/find_max_recursion.py) +- [Find Min](maths/find_min.py) +- [Find Min Recursion](maths/find_min_recursion.py) +- [Floor](maths/floor.py) +- [Gamma](maths/gamma.py) +- [Gamma Recursive](maths/gamma_recursive.py) +- [Gaussian](maths/gaussian.py) +- [Greatest Common Divisor](maths/greatest_common_divisor.py) +- [Greedy Coin Change](maths/greedy_coin_change.py) +- [Hamming Numbers](maths/hamming_numbers.py) +- [Hardy Ramanujanalgo](maths/hardy_ramanujanalgo.py) +- [Integration By Simpson Approx](maths/integration_by_simpson_approx.py) +- [Is Ip V4 Address Valid](maths/is_ip_v4_address_valid.py) +- [Is Square Free](maths/is_square_free.py) +- [Jaccard Similarity](maths/jaccard_similarity.py) +- [Kadanes](maths/kadanes.py) +- [Karatsuba](maths/karatsuba.py) +- [Krishnamurthy Number](maths/krishnamurthy_number.py) +- [Kth Lexicographic Permutation](maths/kth_lexicographic_permutation.py) +- [Largest Of Very Large Numbers](maths/largest_of_very_large_numbers.py) +- [Largest Subarray Sum](maths/largest_subarray_sum.py) +- [Least Common Multiple](maths/least_common_multiple.py) +- [Line Length](maths/line_length.py) +- [Lucas Lehmer Primality Test](maths/lucas_lehmer_primality_test.py) +- [Lucas Series](maths/lucas_series.py) +- [Matrix Exponentiation](maths/matrix_exponentiation.py) +- [Max Sum Sliding Window](maths/max_sum_sliding_window.py) +- [Median Of Two Arrays](maths/median_of_two_arrays.py) +- [Miller Rabin](maths/miller_rabin.py) +- [Mobius Function](maths/mobius_function.py) +- [Modular Exponential](maths/modular_exponential.py) +- [Monte Carlo](maths/monte_carlo.py) +- [Monte Carlo Dice](maths/monte_carlo_dice.py) +- [Nevilles Method](maths/nevilles_method.py) +- [Newton Raphson](maths/newton_raphson.py) +- [Number Of Digits](maths/number_of_digits.py) +- [Numerical Integration](maths/numerical_integration.py) +- [Perfect Cube](maths/perfect_cube.py) +- [Perfect Number](maths/perfect_number.py) +- [Perfect Square](maths/perfect_square.py) +- [Persistence](maths/persistence.py) +- [Pi Monte Carlo Estimation](maths/pi_monte_carlo_estimation.py) +- [Points Are Collinear 3D](maths/points_are_collinear_3d.py) +- [Pollard Rho](maths/pollard_rho.py) +- [Polynomial Evaluation](maths/polynomial_evaluation.py) +- [Power Using Recursion](maths/power_using_recursion.py) +- [Prime Check](maths/prime_check.py) +- [Prime Factors](maths/prime_factors.py) +- [Prime Numbers](maths/prime_numbers.py) +- [Prime Sieve Eratosthenes](maths/prime_sieve_eratosthenes.py) +- [Primelib](maths/primelib.py) +- [Proth Number](maths/proth_number.py) +- [Pythagoras](maths/pythagoras.py) +- [Qr Decomposition](maths/qr_decomposition.py) +- [Quadratic Equations Complex Numbers](maths/quadratic_equations_complex_numbers.py) +- [Radians](maths/radians.py) +- [Radix2 Fft](maths/radix2_fft.py) +- [Relu](maths/relu.py) +- [Runge Kutta](maths/runge_kutta.py) +- [Segmented Sieve](maths/segmented_sieve.py) +- Series + - [Arithmetic](maths/series/arithmetic.py) + - [Geometric](maths/series/geometric.py) + - [Geometric Series](maths/series/geometric_series.py) + - [Harmonic](maths/series/harmonic.py) + - [Harmonic Series](maths/series/harmonic_series.py) + - [Hexagonal Numbers](maths/series/hexagonal_numbers.py) + - [P Series](maths/series/p_series.py) +- [Sieve Of Eratosthenes](maths/sieve_of_eratosthenes.py) +- [Sigmoid](maths/sigmoid.py) +- [Simpson Rule](maths/simpson_rule.py) +- [Sin](maths/sin.py) +- [Sock Merchant](maths/sock_merchant.py) +- [Softmax](maths/softmax.py) +- [Square Root](maths/square_root.py) +- [Sum Of Arithmetic Series](maths/sum_of_arithmetic_series.py) +- [Sum Of Digits](maths/sum_of_digits.py) +- [Sum Of Geometric Progression](maths/sum_of_geometric_progression.py) +- [Sylvester Sequence](maths/sylvester_sequence.py) +- [Test Prime Check](maths/test_prime_check.py) +- [Trapezoidal Rule](maths/trapezoidal_rule.py) +- [Triplet Sum](maths/triplet_sum.py) +- [Two Pointer](maths/two_pointer.py) +- [Two Sum](maths/two_sum.py) +- [Ugly Numbers](maths/ugly_numbers.py) +- [Volume](maths/volume.py) +- [Weird Number](maths/weird_number.py) +- [Zellers Congruence](maths/zellers_congruence.py) ## Matrix - * [Binary Search Matrix](matrix/binary_search_matrix.py) - * [Count Islands In Matrix](matrix/count_islands_in_matrix.py) - * [Inverse Of Matrix](matrix/inverse_of_matrix.py) - * [Matrix Class](matrix/matrix_class.py) - * [Matrix Operation](matrix/matrix_operation.py) - * [Nth Fibonacci Using Matrix Exponentiation](matrix/nth_fibonacci_using_matrix_exponentiation.py) - * [Rotate Matrix](matrix/rotate_matrix.py) - * [Searching In Sorted Matrix](matrix/searching_in_sorted_matrix.py) - * [Sherman Morrison](matrix/sherman_morrison.py) - * [Spiral Print](matrix/spiral_print.py) - * Tests - * [Test Matrix Operation](matrix/tests/test_matrix_operation.py) + +- [Binary Search Matrix](matrix/binary_search_matrix.py) +- [Count Islands In Matrix](matrix/count_islands_in_matrix.py) +- [Inverse Of Matrix](matrix/inverse_of_matrix.py) +- [Matrix Class](matrix/matrix_class.py) +- [Matrix Operation](matrix/matrix_operation.py) +- [Nth Fibonacci Using Matrix Exponentiation](matrix/nth_fibonacci_using_matrix_exponentiation.py) +- [Rotate Matrix](matrix/rotate_matrix.py) +- [Searching In Sorted Matrix](matrix/searching_in_sorted_matrix.py) +- [Sherman Morrison](matrix/sherman_morrison.py) +- [Spiral Print](matrix/spiral_print.py) +- Tests + - [Test Matrix Operation](matrix/tests/test_matrix_operation.py) ## Networking Flow - * [Ford Fulkerson](networking_flow/ford_fulkerson.py) - * [Minimum Cut](networking_flow/minimum_cut.py) + +- [Ford Fulkerson](networking_flow/ford_fulkerson.py) +- [Minimum Cut](networking_flow/minimum_cut.py) ## Neural Network - * [2 Hidden Layers Neural Network](neural_network/2_hidden_layers_neural_network.py) - * [Back Propagation Neural Network](neural_network/back_propagation_neural_network.py) - * [Convolution Neural Network](neural_network/convolution_neural_network.py) - * [Perceptron](neural_network/perceptron.py) + +- [2 Hidden Layers Neural Network](neural_network/2_hidden_layers_neural_network.py) +- [Back Propagation Neural Network](neural_network/back_propagation_neural_network.py) +- [Convolution Neural Network](neural_network/convolution_neural_network.py) +- [Perceptron](neural_network/perceptron.py) ## Other - * [Activity Selection](other/activity_selection.py) - * [Alternative List Arrange](other/alternative_list_arrange.py) - * [Check Strong Password](other/check_strong_password.py) - * [Davisb Putnamb Logemannb Loveland](other/davisb_putnamb_logemannb_loveland.py) - * [Dijkstra Bankers Algorithm](other/dijkstra_bankers_algorithm.py) - * [Doomsday](other/doomsday.py) - * [Fischer Yates Shuffle](other/fischer_yates_shuffle.py) - * [Gauss Easter](other/gauss_easter.py) - * [Graham Scan](other/graham_scan.py) - * [Greedy](other/greedy.py) - * [Least Recently Used](other/least_recently_used.py) - * [Lfu Cache](other/lfu_cache.py) - * [Linear Congruential Generator](other/linear_congruential_generator.py) - * [Lru Cache](other/lru_cache.py) - * [Magicdiamondpattern](other/magicdiamondpattern.py) - * [Maximum Subarray](other/maximum_subarray.py) - * [Nested Brackets](other/nested_brackets.py) - * [Password Generator](other/password_generator.py) - * [Scoring Algorithm](other/scoring_algorithm.py) - * [Sdes](other/sdes.py) - * [Tower Of Hanoi](other/tower_of_hanoi.py) + +- [Pascal Triangle](other/pascal_triangle.py) +- [Activity Selection](other/activity_selection.py) +- [Alternative List Arrange](other/alternative_list_arrange.py) +- [Check Strong Password](other/check_strong_password.py) +- [Davisb Putnamb Logemannb Loveland](other/davisb_putnamb_logemannb_loveland.py) +- [Dijkstra Bankers Algorithm](other/dijkstra_bankers_algorithm.py) +- [Doomsday](other/doomsday.py) +- [Fischer Yates Shuffle](other/fischer_yates_shuffle.py) +- [Gauss Easter](other/gauss_easter.py) +- [Graham Scan](other/graham_scan.py) +- [Greedy](other/greedy.py) +- [Least Recently Used](other/least_recently_used.py) +- [Lfu Cache](other/lfu_cache.py) +- [Linear Congruential Generator](other/linear_congruential_generator.py) +- [Lru Cache](other/lru_cache.py) +- [Magicdiamondpattern](other/magicdiamondpattern.py) +- [Maximum Subarray](other/maximum_subarray.py) +- [Nested Brackets](other/nested_brackets.py) +- [Password Generator](other/password_generator.py) +- [Scoring Algorithm](other/scoring_algorithm.py) +- [Sdes](other/sdes.py) +- [Tower Of Hanoi](other/tower_of_hanoi.py) ## Physics - * [Horizontal Projectile Motion](physics/horizontal_projectile_motion.py) - * [Lorentz Transformation Four Vector](physics/lorentz_transformation_four_vector.py) - * [N Body Simulation](physics/n_body_simulation.py) - * [Newtons Law Of Gravitation](physics/newtons_law_of_gravitation.py) - * [Newtons Second Law Of Motion](physics/newtons_second_law_of_motion.py) + +- [Horizontal Projectile Motion](physics/horizontal_projectile_motion.py) +- [Lorentz Transformation Four Vector](physics/lorentz_transformation_four_vector.py) +- [N Body Simulation](physics/n_body_simulation.py) +- [Newtons Law Of Gravitation](physics/newtons_law_of_gravitation.py) +- [Newtons Second Law Of Motion](physics/newtons_second_law_of_motion.py) ## Project Euler - * Problem 001 - * [Sol1](project_euler/problem_001/sol1.py) - * [Sol2](project_euler/problem_001/sol2.py) - * [Sol3](project_euler/problem_001/sol3.py) - * [Sol4](project_euler/problem_001/sol4.py) - * [Sol5](project_euler/problem_001/sol5.py) - * [Sol6](project_euler/problem_001/sol6.py) - * [Sol7](project_euler/problem_001/sol7.py) - * Problem 002 - * [Sol1](project_euler/problem_002/sol1.py) - * [Sol2](project_euler/problem_002/sol2.py) - * [Sol3](project_euler/problem_002/sol3.py) - * [Sol4](project_euler/problem_002/sol4.py) - * [Sol5](project_euler/problem_002/sol5.py) - * Problem 003 - * [Sol1](project_euler/problem_003/sol1.py) - * [Sol2](project_euler/problem_003/sol2.py) - * [Sol3](project_euler/problem_003/sol3.py) - * Problem 004 - * [Sol1](project_euler/problem_004/sol1.py) - * [Sol2](project_euler/problem_004/sol2.py) - * Problem 005 - * [Sol1](project_euler/problem_005/sol1.py) - * [Sol2](project_euler/problem_005/sol2.py) - * Problem 006 - * [Sol1](project_euler/problem_006/sol1.py) - * [Sol2](project_euler/problem_006/sol2.py) - * [Sol3](project_euler/problem_006/sol3.py) - * [Sol4](project_euler/problem_006/sol4.py) - * Problem 007 - * [Sol1](project_euler/problem_007/sol1.py) - * [Sol2](project_euler/problem_007/sol2.py) - * [Sol3](project_euler/problem_007/sol3.py) - * Problem 008 - * [Sol1](project_euler/problem_008/sol1.py) - * [Sol2](project_euler/problem_008/sol2.py) - * [Sol3](project_euler/problem_008/sol3.py) - * Problem 009 - * [Sol1](project_euler/problem_009/sol1.py) - * [Sol2](project_euler/problem_009/sol2.py) - * [Sol3](project_euler/problem_009/sol3.py) - * Problem 010 - * [Sol1](project_euler/problem_010/sol1.py) - * [Sol2](project_euler/problem_010/sol2.py) - * [Sol3](project_euler/problem_010/sol3.py) - * Problem 011 - * [Sol1](project_euler/problem_011/sol1.py) - * [Sol2](project_euler/problem_011/sol2.py) - * Problem 012 - * [Sol1](project_euler/problem_012/sol1.py) - * [Sol2](project_euler/problem_012/sol2.py) - * Problem 013 - * [Sol1](project_euler/problem_013/sol1.py) - * Problem 014 - * [Sol1](project_euler/problem_014/sol1.py) - * [Sol2](project_euler/problem_014/sol2.py) - * Problem 015 - * [Sol1](project_euler/problem_015/sol1.py) - * Problem 016 - * [Sol1](project_euler/problem_016/sol1.py) - * [Sol2](project_euler/problem_016/sol2.py) - * Problem 017 - * [Sol1](project_euler/problem_017/sol1.py) - * Problem 018 - * [Solution](project_euler/problem_018/solution.py) - * Problem 019 - * [Sol1](project_euler/problem_019/sol1.py) - * Problem 020 - * [Sol1](project_euler/problem_020/sol1.py) - * [Sol2](project_euler/problem_020/sol2.py) - * [Sol3](project_euler/problem_020/sol3.py) - * [Sol4](project_euler/problem_020/sol4.py) - * Problem 021 - * [Sol1](project_euler/problem_021/sol1.py) - * Problem 022 - * [Sol1](project_euler/problem_022/sol1.py) - * [Sol2](project_euler/problem_022/sol2.py) - * Problem 023 - * [Sol1](project_euler/problem_023/sol1.py) - * Problem 024 - * [Sol1](project_euler/problem_024/sol1.py) - * Problem 025 - * [Sol1](project_euler/problem_025/sol1.py) - * [Sol2](project_euler/problem_025/sol2.py) - * [Sol3](project_euler/problem_025/sol3.py) - * Problem 026 - * [Sol1](project_euler/problem_026/sol1.py) - * Problem 027 - * [Sol1](project_euler/problem_027/sol1.py) - * Problem 028 - * [Sol1](project_euler/problem_028/sol1.py) - * Problem 029 - * [Sol1](project_euler/problem_029/sol1.py) - * Problem 030 - * [Sol1](project_euler/problem_030/sol1.py) - * Problem 031 - * [Sol1](project_euler/problem_031/sol1.py) - * [Sol2](project_euler/problem_031/sol2.py) - * Problem 032 - * [Sol32](project_euler/problem_032/sol32.py) - * Problem 033 - * [Sol1](project_euler/problem_033/sol1.py) - * Problem 034 - * [Sol1](project_euler/problem_034/sol1.py) - * Problem 035 - * [Sol1](project_euler/problem_035/sol1.py) - * Problem 036 - * [Sol1](project_euler/problem_036/sol1.py) - * Problem 037 - * [Sol1](project_euler/problem_037/sol1.py) - * Problem 038 - * [Sol1](project_euler/problem_038/sol1.py) - * Problem 039 - * [Sol1](project_euler/problem_039/sol1.py) - * Problem 040 - * [Sol1](project_euler/problem_040/sol1.py) - * Problem 041 - * [Sol1](project_euler/problem_041/sol1.py) - * Problem 042 - * [Solution42](project_euler/problem_042/solution42.py) - * Problem 043 - * [Sol1](project_euler/problem_043/sol1.py) - * Problem 044 - * [Sol1](project_euler/problem_044/sol1.py) - * Problem 045 - * [Sol1](project_euler/problem_045/sol1.py) - * Problem 046 - * [Sol1](project_euler/problem_046/sol1.py) - * Problem 047 - * [Sol1](project_euler/problem_047/sol1.py) - * Problem 048 - * [Sol1](project_euler/problem_048/sol1.py) - * Problem 049 - * [Sol1](project_euler/problem_049/sol1.py) - * Problem 050 - * [Sol1](project_euler/problem_050/sol1.py) - * Problem 051 - * [Sol1](project_euler/problem_051/sol1.py) - * Problem 052 - * [Sol1](project_euler/problem_052/sol1.py) - * Problem 053 - * [Sol1](project_euler/problem_053/sol1.py) - * Problem 054 - * [Sol1](project_euler/problem_054/sol1.py) - * [Test Poker Hand](project_euler/problem_054/test_poker_hand.py) - * Problem 055 - * [Sol1](project_euler/problem_055/sol1.py) - * Problem 056 - * [Sol1](project_euler/problem_056/sol1.py) - * Problem 057 - * [Sol1](project_euler/problem_057/sol1.py) - * Problem 058 - * [Sol1](project_euler/problem_058/sol1.py) - * Problem 059 - * [Sol1](project_euler/problem_059/sol1.py) - * Problem 062 - * [Sol1](project_euler/problem_062/sol1.py) - * Problem 063 - * [Sol1](project_euler/problem_063/sol1.py) - * Problem 064 - * [Sol1](project_euler/problem_064/sol1.py) - * Problem 065 - * [Sol1](project_euler/problem_065/sol1.py) - * Problem 067 - * [Sol1](project_euler/problem_067/sol1.py) - * [Sol2](project_euler/problem_067/sol2.py) - * Problem 068 - * [Sol1](project_euler/problem_068/sol1.py) - * Problem 069 - * [Sol1](project_euler/problem_069/sol1.py) - * Problem 070 - * [Sol1](project_euler/problem_070/sol1.py) - * Problem 071 - * [Sol1](project_euler/problem_071/sol1.py) - * Problem 072 - * [Sol1](project_euler/problem_072/sol1.py) - * [Sol2](project_euler/problem_072/sol2.py) - * Problem 074 - * [Sol1](project_euler/problem_074/sol1.py) - * [Sol2](project_euler/problem_074/sol2.py) - * Problem 075 - * [Sol1](project_euler/problem_075/sol1.py) - * Problem 076 - * [Sol1](project_euler/problem_076/sol1.py) - * Problem 077 - * [Sol1](project_euler/problem_077/sol1.py) - * Problem 078 - * [Sol1](project_euler/problem_078/sol1.py) - * Problem 080 - * [Sol1](project_euler/problem_080/sol1.py) - * Problem 081 - * [Sol1](project_euler/problem_081/sol1.py) - * Problem 085 - * [Sol1](project_euler/problem_085/sol1.py) - * Problem 086 - * [Sol1](project_euler/problem_086/sol1.py) - * Problem 087 - * [Sol1](project_euler/problem_087/sol1.py) - * Problem 089 - * [Sol1](project_euler/problem_089/sol1.py) - * Problem 091 - * [Sol1](project_euler/problem_091/sol1.py) - * Problem 092 - * [Sol1](project_euler/problem_092/sol1.py) - * Problem 097 - * [Sol1](project_euler/problem_097/sol1.py) - * Problem 099 - * [Sol1](project_euler/problem_099/sol1.py) - * Problem 101 - * [Sol1](project_euler/problem_101/sol1.py) - * Problem 102 - * [Sol1](project_euler/problem_102/sol1.py) - * Problem 107 - * [Sol1](project_euler/problem_107/sol1.py) - * Problem 109 - * [Sol1](project_euler/problem_109/sol1.py) - * Problem 112 - * [Sol1](project_euler/problem_112/sol1.py) - * Problem 113 - * [Sol1](project_euler/problem_113/sol1.py) - * Problem 114 - * [Sol1](project_euler/problem_114/sol1.py) - * Problem 115 - * [Sol1](project_euler/problem_115/sol1.py) - * Problem 116 - * [Sol1](project_euler/problem_116/sol1.py) - * Problem 119 - * [Sol1](project_euler/problem_119/sol1.py) - * Problem 120 - * [Sol1](project_euler/problem_120/sol1.py) - * Problem 121 - * [Sol1](project_euler/problem_121/sol1.py) - * Problem 123 - * [Sol1](project_euler/problem_123/sol1.py) - * Problem 125 - * [Sol1](project_euler/problem_125/sol1.py) - * Problem 129 - * [Sol1](project_euler/problem_129/sol1.py) - * Problem 135 - * [Sol1](project_euler/problem_135/sol1.py) - * Problem 144 - * [Sol1](project_euler/problem_144/sol1.py) - * Problem 145 - * [Sol1](project_euler/problem_145/sol1.py) - * Problem 173 - * [Sol1](project_euler/problem_173/sol1.py) - * Problem 174 - * [Sol1](project_euler/problem_174/sol1.py) - * Problem 180 - * [Sol1](project_euler/problem_180/sol1.py) - * Problem 188 - * [Sol1](project_euler/problem_188/sol1.py) - * Problem 191 - * [Sol1](project_euler/problem_191/sol1.py) - * Problem 203 - * [Sol1](project_euler/problem_203/sol1.py) - * Problem 205 - * [Sol1](project_euler/problem_205/sol1.py) - * Problem 206 - * [Sol1](project_euler/problem_206/sol1.py) - * Problem 207 - * [Sol1](project_euler/problem_207/sol1.py) - * Problem 234 - * [Sol1](project_euler/problem_234/sol1.py) - * Problem 301 - * [Sol1](project_euler/problem_301/sol1.py) - * Problem 493 - * [Sol1](project_euler/problem_493/sol1.py) - * Problem 551 - * [Sol1](project_euler/problem_551/sol1.py) - * Problem 587 - * [Sol1](project_euler/problem_587/sol1.py) - * Problem 686 - * [Sol1](project_euler/problem_686/sol1.py) + +- Problem 001 + - [Sol1](project_euler/problem_001/sol1.py) + - [Sol2](project_euler/problem_001/sol2.py) + - [Sol3](project_euler/problem_001/sol3.py) + - [Sol4](project_euler/problem_001/sol4.py) + - [Sol5](project_euler/problem_001/sol5.py) + - [Sol6](project_euler/problem_001/sol6.py) + - [Sol7](project_euler/problem_001/sol7.py) +- Problem 002 + - [Sol1](project_euler/problem_002/sol1.py) + - [Sol2](project_euler/problem_002/sol2.py) + - [Sol3](project_euler/problem_002/sol3.py) + - [Sol4](project_euler/problem_002/sol4.py) + - [Sol5](project_euler/problem_002/sol5.py) +- Problem 003 + - [Sol1](project_euler/problem_003/sol1.py) + - [Sol2](project_euler/problem_003/sol2.py) + - [Sol3](project_euler/problem_003/sol3.py) +- Problem 004 + - [Sol1](project_euler/problem_004/sol1.py) + - [Sol2](project_euler/problem_004/sol2.py) +- Problem 005 + - [Sol1](project_euler/problem_005/sol1.py) + - [Sol2](project_euler/problem_005/sol2.py) +- Problem 006 + - [Sol1](project_euler/problem_006/sol1.py) + - [Sol2](project_euler/problem_006/sol2.py) + - [Sol3](project_euler/problem_006/sol3.py) + - [Sol4](project_euler/problem_006/sol4.py) +- Problem 007 + - [Sol1](project_euler/problem_007/sol1.py) + - [Sol2](project_euler/problem_007/sol2.py) + - [Sol3](project_euler/problem_007/sol3.py) +- Problem 008 + - [Sol1](project_euler/problem_008/sol1.py) + - [Sol2](project_euler/problem_008/sol2.py) + - [Sol3](project_euler/problem_008/sol3.py) +- Problem 009 + - [Sol1](project_euler/problem_009/sol1.py) + - [Sol2](project_euler/problem_009/sol2.py) + - [Sol3](project_euler/problem_009/sol3.py) +- Problem 010 + - [Sol1](project_euler/problem_010/sol1.py) + - [Sol2](project_euler/problem_010/sol2.py) + - [Sol3](project_euler/problem_010/sol3.py) +- Problem 011 + - [Sol1](project_euler/problem_011/sol1.py) + - [Sol2](project_euler/problem_011/sol2.py) +- Problem 012 + - [Sol1](project_euler/problem_012/sol1.py) + - [Sol2](project_euler/problem_012/sol2.py) +- Problem 013 + - [Sol1](project_euler/problem_013/sol1.py) +- Problem 014 + - [Sol1](project_euler/problem_014/sol1.py) + - [Sol2](project_euler/problem_014/sol2.py) +- Problem 015 + - [Sol1](project_euler/problem_015/sol1.py) +- Problem 016 + - [Sol1](project_euler/problem_016/sol1.py) + - [Sol2](project_euler/problem_016/sol2.py) +- Problem 017 + - [Sol1](project_euler/problem_017/sol1.py) +- Problem 018 + - [Solution](project_euler/problem_018/solution.py) +- Problem 019 + - [Sol1](project_euler/problem_019/sol1.py) +- Problem 020 + - [Sol1](project_euler/problem_020/sol1.py) + - [Sol2](project_euler/problem_020/sol2.py) + - [Sol3](project_euler/problem_020/sol3.py) + - [Sol4](project_euler/problem_020/sol4.py) +- Problem 021 + - [Sol1](project_euler/problem_021/sol1.py) +- Problem 022 + - [Sol1](project_euler/problem_022/sol1.py) + - [Sol2](project_euler/problem_022/sol2.py) +- Problem 023 + - [Sol1](project_euler/problem_023/sol1.py) +- Problem 024 + - [Sol1](project_euler/problem_024/sol1.py) +- Problem 025 + - [Sol1](project_euler/problem_025/sol1.py) + - [Sol2](project_euler/problem_025/sol2.py) + - [Sol3](project_euler/problem_025/sol3.py) +- Problem 026 + - [Sol1](project_euler/problem_026/sol1.py) +- Problem 027 + - [Sol1](project_euler/problem_027/sol1.py) +- Problem 028 + - [Sol1](project_euler/problem_028/sol1.py) +- Problem 029 + - [Sol1](project_euler/problem_029/sol1.py) +- Problem 030 + - [Sol1](project_euler/problem_030/sol1.py) +- Problem 031 + - [Sol1](project_euler/problem_031/sol1.py) + - [Sol2](project_euler/problem_031/sol2.py) +- Problem 032 + - [Sol32](project_euler/problem_032/sol32.py) +- Problem 033 + - [Sol1](project_euler/problem_033/sol1.py) +- Problem 034 + - [Sol1](project_euler/problem_034/sol1.py) +- Problem 035 + - [Sol1](project_euler/problem_035/sol1.py) +- Problem 036 + - [Sol1](project_euler/problem_036/sol1.py) +- Problem 037 + - [Sol1](project_euler/problem_037/sol1.py) +- Problem 038 + - [Sol1](project_euler/problem_038/sol1.py) +- Problem 039 + - [Sol1](project_euler/problem_039/sol1.py) +- Problem 040 + - [Sol1](project_euler/problem_040/sol1.py) +- Problem 041 + - [Sol1](project_euler/problem_041/sol1.py) +- Problem 042 + - [Solution42](project_euler/problem_042/solution42.py) +- Problem 043 + - [Sol1](project_euler/problem_043/sol1.py) +- Problem 044 + - [Sol1](project_euler/problem_044/sol1.py) +- Problem 045 + - [Sol1](project_euler/problem_045/sol1.py) +- Problem 046 + - [Sol1](project_euler/problem_046/sol1.py) +- Problem 047 + - [Sol1](project_euler/problem_047/sol1.py) +- Problem 048 + - [Sol1](project_euler/problem_048/sol1.py) +- Problem 049 + - [Sol1](project_euler/problem_049/sol1.py) +- Problem 050 + - [Sol1](project_euler/problem_050/sol1.py) +- Problem 051 + - [Sol1](project_euler/problem_051/sol1.py) +- Problem 052 + - [Sol1](project_euler/problem_052/sol1.py) +- Problem 053 + - [Sol1](project_euler/problem_053/sol1.py) +- Problem 054 + - [Sol1](project_euler/problem_054/sol1.py) + - [Test Poker Hand](project_euler/problem_054/test_poker_hand.py) +- Problem 055 + - [Sol1](project_euler/problem_055/sol1.py) +- Problem 056 + - [Sol1](project_euler/problem_056/sol1.py) +- Problem 057 + - [Sol1](project_euler/problem_057/sol1.py) +- Problem 058 + - [Sol1](project_euler/problem_058/sol1.py) +- Problem 059 + - [Sol1](project_euler/problem_059/sol1.py) +- Problem 062 + - [Sol1](project_euler/problem_062/sol1.py) +- Problem 063 + - [Sol1](project_euler/problem_063/sol1.py) +- Problem 064 + - [Sol1](project_euler/problem_064/sol1.py) +- Problem 065 + - [Sol1](project_euler/problem_065/sol1.py) +- Problem 067 + - [Sol1](project_euler/problem_067/sol1.py) + - [Sol2](project_euler/problem_067/sol2.py) +- Problem 068 + - [Sol1](project_euler/problem_068/sol1.py) +- Problem 069 + - [Sol1](project_euler/problem_069/sol1.py) +- Problem 070 + - [Sol1](project_euler/problem_070/sol1.py) +- Problem 071 + - [Sol1](project_euler/problem_071/sol1.py) +- Problem 072 + - [Sol1](project_euler/problem_072/sol1.py) + - [Sol2](project_euler/problem_072/sol2.py) +- Problem 074 + - [Sol1](project_euler/problem_074/sol1.py) + - [Sol2](project_euler/problem_074/sol2.py) +- Problem 075 + - [Sol1](project_euler/problem_075/sol1.py) +- Problem 076 + - [Sol1](project_euler/problem_076/sol1.py) +- Problem 077 + - [Sol1](project_euler/problem_077/sol1.py) +- Problem 078 + - [Sol1](project_euler/problem_078/sol1.py) +- Problem 080 + - [Sol1](project_euler/problem_080/sol1.py) +- Problem 081 + - [Sol1](project_euler/problem_081/sol1.py) +- Problem 085 + - [Sol1](project_euler/problem_085/sol1.py) +- Problem 086 + - [Sol1](project_euler/problem_086/sol1.py) +- Problem 087 + - [Sol1](project_euler/problem_087/sol1.py) +- Problem 089 + - [Sol1](project_euler/problem_089/sol1.py) +- Problem 091 + - [Sol1](project_euler/problem_091/sol1.py) +- Problem 092 + - [Sol1](project_euler/problem_092/sol1.py) +- Problem 097 + - [Sol1](project_euler/problem_097/sol1.py) +- Problem 099 + - [Sol1](project_euler/problem_099/sol1.py) +- Problem 101 + - [Sol1](project_euler/problem_101/sol1.py) +- Problem 102 + - [Sol1](project_euler/problem_102/sol1.py) +- Problem 107 + - [Sol1](project_euler/problem_107/sol1.py) +- Problem 109 + - [Sol1](project_euler/problem_109/sol1.py) +- Problem 112 + - [Sol1](project_euler/problem_112/sol1.py) +- Problem 113 + - [Sol1](project_euler/problem_113/sol1.py) +- Problem 114 + - [Sol1](project_euler/problem_114/sol1.py) +- Problem 115 + - [Sol1](project_euler/problem_115/sol1.py) +- Problem 116 + - [Sol1](project_euler/problem_116/sol1.py) +- Problem 119 + - [Sol1](project_euler/problem_119/sol1.py) +- Problem 120 + - [Sol1](project_euler/problem_120/sol1.py) +- Problem 121 + - [Sol1](project_euler/problem_121/sol1.py) +- Problem 123 + - [Sol1](project_euler/problem_123/sol1.py) +- Problem 125 + - [Sol1](project_euler/problem_125/sol1.py) +- Problem 129 + - [Sol1](project_euler/problem_129/sol1.py) +- Problem 135 + - [Sol1](project_euler/problem_135/sol1.py) +- Problem 144 + - [Sol1](project_euler/problem_144/sol1.py) +- Problem 145 + - [Sol1](project_euler/problem_145/sol1.py) +- Problem 173 + - [Sol1](project_euler/problem_173/sol1.py) +- Problem 174 + - [Sol1](project_euler/problem_174/sol1.py) +- Problem 180 + - [Sol1](project_euler/problem_180/sol1.py) +- Problem 188 + - [Sol1](project_euler/problem_188/sol1.py) +- Problem 191 + - [Sol1](project_euler/problem_191/sol1.py) +- Problem 203 + - [Sol1](project_euler/problem_203/sol1.py) +- Problem 205 + - [Sol1](project_euler/problem_205/sol1.py) +- Problem 206 + - [Sol1](project_euler/problem_206/sol1.py) +- Problem 207 + - [Sol1](project_euler/problem_207/sol1.py) +- Problem 234 + - [Sol1](project_euler/problem_234/sol1.py) +- Problem 301 + - [Sol1](project_euler/problem_301/sol1.py) +- Problem 493 + - [Sol1](project_euler/problem_493/sol1.py) +- Problem 551 + - [Sol1](project_euler/problem_551/sol1.py) +- Problem 587 + - [Sol1](project_euler/problem_587/sol1.py) +- Problem 686 + - [Sol1](project_euler/problem_686/sol1.py) ## Quantum - * [Deutsch Jozsa](quantum/deutsch_jozsa.py) - * [Half Adder](quantum/half_adder.py) - * [Not Gate](quantum/not_gate.py) - * [Quantum Entanglement](quantum/quantum_entanglement.py) - * [Ripple Adder Classic](quantum/ripple_adder_classic.py) - * [Single Qubit Measure](quantum/single_qubit_measure.py) + +- [Deutsch Jozsa](quantum/deutsch_jozsa.py) +- [Half Adder](quantum/half_adder.py) +- [Not Gate](quantum/not_gate.py) +- [Quantum Entanglement](quantum/quantum_entanglement.py) +- [Ripple Adder Classic](quantum/ripple_adder_classic.py) +- [Single Qubit Measure](quantum/single_qubit_measure.py) ## Scheduling - * [First Come First Served](scheduling/first_come_first_served.py) - * [Highest Response Ratio Next](scheduling/highest_response_ratio_next.py) - * [Job Sequencing With Deadline](scheduling/job_sequencing_with_deadline.py) - * [Multi Level Feedback Queue](scheduling/multi_level_feedback_queue.py) - * [Non Preemptive Shortest Job First](scheduling/non_preemptive_shortest_job_first.py) - * [Round Robin](scheduling/round_robin.py) - * [Shortest Job First](scheduling/shortest_job_first.py) + +- [First Come First Served](scheduling/first_come_first_served.py) +- [Highest Response Ratio Next](scheduling/highest_response_ratio_next.py) +- [Job Sequencing With Deadline](scheduling/job_sequencing_with_deadline.py) +- [Multi Level Feedback Queue](scheduling/multi_level_feedback_queue.py) +- [Non Preemptive Shortest Job First](scheduling/non_preemptive_shortest_job_first.py) +- [Round Robin](scheduling/round_robin.py) +- [Shortest Job First](scheduling/shortest_job_first.py) ## Searches - * [Binary Search](searches/binary_search.py) - * [Binary Tree Traversal](searches/binary_tree_traversal.py) - * [Double Linear Search](searches/double_linear_search.py) - * [Double Linear Search Recursion](searches/double_linear_search_recursion.py) - * [Fibonacci Search](searches/fibonacci_search.py) - * [Hill Climbing](searches/hill_climbing.py) - * [Interpolation Search](searches/interpolation_search.py) - * [Jump Search](searches/jump_search.py) - * [Linear Search](searches/linear_search.py) - * [Quick Select](searches/quick_select.py) - * [Sentinel Linear Search](searches/sentinel_linear_search.py) - * [Simple Binary Search](searches/simple_binary_search.py) - * [Simulated Annealing](searches/simulated_annealing.py) - * [Tabu Search](searches/tabu_search.py) - * [Ternary Search](searches/ternary_search.py) + +- [Binary Search](searches/binary_search.py) +- [Binary Tree Traversal](searches/binary_tree_traversal.py) +- [Double Linear Search](searches/double_linear_search.py) +- [Double Linear Search Recursion](searches/double_linear_search_recursion.py) +- [Fibonacci Search](searches/fibonacci_search.py) +- [Hill Climbing](searches/hill_climbing.py) +- [Interpolation Search](searches/interpolation_search.py) +- [Jump Search](searches/jump_search.py) +- [Linear Search](searches/linear_search.py) +- [Quick Select](searches/quick_select.py) +- [Sentinel Linear Search](searches/sentinel_linear_search.py) +- [Simple Binary Search](searches/simple_binary_search.py) +- [Simulated Annealing](searches/simulated_annealing.py) +- [Tabu Search](searches/tabu_search.py) +- [Ternary Search](searches/ternary_search.py) ## Sorts - * [Bead Sort](sorts/bead_sort.py) - * [Bitonic Sort](sorts/bitonic_sort.py) - * [Bogo Sort](sorts/bogo_sort.py) - * [Bubble Sort](sorts/bubble_sort.py) - * [Bucket Sort](sorts/bucket_sort.py) - * [Circle Sort](sorts/circle_sort.py) - * [Cocktail Shaker Sort](sorts/cocktail_shaker_sort.py) - * [Comb Sort](sorts/comb_sort.py) - * [Counting Sort](sorts/counting_sort.py) - * [Cycle Sort](sorts/cycle_sort.py) - * [Double Sort](sorts/double_sort.py) - * [Dutch National Flag Sort](sorts/dutch_national_flag_sort.py) - * [Exchange Sort](sorts/exchange_sort.py) - * [External Sort](sorts/external_sort.py) - * [Gnome Sort](sorts/gnome_sort.py) - * [Heap Sort](sorts/heap_sort.py) - * [Insertion Sort](sorts/insertion_sort.py) - * [Intro Sort](sorts/intro_sort.py) - * [Iterative Merge Sort](sorts/iterative_merge_sort.py) - * [Merge Insertion Sort](sorts/merge_insertion_sort.py) - * [Merge Sort](sorts/merge_sort.py) - * [Msd Radix Sort](sorts/msd_radix_sort.py) - * [Natural Sort](sorts/natural_sort.py) - * [Odd Even Sort](sorts/odd_even_sort.py) - * [Odd Even Transposition Parallel](sorts/odd_even_transposition_parallel.py) - * [Odd Even Transposition Single Threaded](sorts/odd_even_transposition_single_threaded.py) - * [Pancake Sort](sorts/pancake_sort.py) - * [Patience Sort](sorts/patience_sort.py) - * [Pigeon Sort](sorts/pigeon_sort.py) - * [Pigeonhole Sort](sorts/pigeonhole_sort.py) - * [Quick Sort](sorts/quick_sort.py) - * [Quick Sort 3 Partition](sorts/quick_sort_3_partition.py) - * [Radix Sort](sorts/radix_sort.py) - * [Random Normal Distribution Quicksort](sorts/random_normal_distribution_quicksort.py) - * [Random Pivot Quick Sort](sorts/random_pivot_quick_sort.py) - * [Recursive Bubble Sort](sorts/recursive_bubble_sort.py) - * [Recursive Insertion Sort](sorts/recursive_insertion_sort.py) - * [Recursive Mergesort Array](sorts/recursive_mergesort_array.py) - * [Recursive Quick Sort](sorts/recursive_quick_sort.py) - * [Selection Sort](sorts/selection_sort.py) - * [Shell Sort](sorts/shell_sort.py) - * [Shrink Shell Sort](sorts/shrink_shell_sort.py) - * [Slowsort](sorts/slowsort.py) - * [Stooge Sort](sorts/stooge_sort.py) - * [Strand Sort](sorts/strand_sort.py) - * [Tim Sort](sorts/tim_sort.py) - * [Topological Sort](sorts/topological_sort.py) - * [Tree Sort](sorts/tree_sort.py) - * [Unknown Sort](sorts/unknown_sort.py) - * [Wiggle Sort](sorts/wiggle_sort.py) + +- [Bead Sort](sorts/bead_sort.py) +- [Bitonic Sort](sorts/bitonic_sort.py) +- [Bogo Sort](sorts/bogo_sort.py) +- [Bubble Sort](sorts/bubble_sort.py) +- [Bucket Sort](sorts/bucket_sort.py) +- [Circle Sort](sorts/circle_sort.py) +- [Cocktail Shaker Sort](sorts/cocktail_shaker_sort.py) +- [Comb Sort](sorts/comb_sort.py) +- [Counting Sort](sorts/counting_sort.py) +- [Cycle Sort](sorts/cycle_sort.py) +- [Double Sort](sorts/double_sort.py) +- [Dutch National Flag Sort](sorts/dutch_national_flag_sort.py) +- [Exchange Sort](sorts/exchange_sort.py) +- [External Sort](sorts/external_sort.py) +- [Gnome Sort](sorts/gnome_sort.py) +- [Heap Sort](sorts/heap_sort.py) +- [Insertion Sort](sorts/insertion_sort.py) +- [Intro Sort](sorts/intro_sort.py) +- [Iterative Merge Sort](sorts/iterative_merge_sort.py) +- [Merge Insertion Sort](sorts/merge_insertion_sort.py) +- [Merge Sort](sorts/merge_sort.py) +- [Msd Radix Sort](sorts/msd_radix_sort.py) +- [Natural Sort](sorts/natural_sort.py) +- [Odd Even Sort](sorts/odd_even_sort.py) +- [Odd Even Transposition Parallel](sorts/odd_even_transposition_parallel.py) +- [Odd Even Transposition Single Threaded](sorts/odd_even_transposition_single_threaded.py) +- [Pancake Sort](sorts/pancake_sort.py) +- [Patience Sort](sorts/patience_sort.py) +- [Pigeon Sort](sorts/pigeon_sort.py) +- [Pigeonhole Sort](sorts/pigeonhole_sort.py) +- [Quick Sort](sorts/quick_sort.py) +- [Quick Sort 3 Partition](sorts/quick_sort_3_partition.py) +- [Radix Sort](sorts/radix_sort.py) +- [Random Normal Distribution Quicksort](sorts/random_normal_distribution_quicksort.py) +- [Random Pivot Quick Sort](sorts/random_pivot_quick_sort.py) +- [Recursive Bubble Sort](sorts/recursive_bubble_sort.py) +- [Recursive Insertion Sort](sorts/recursive_insertion_sort.py) +- [Recursive Mergesort Array](sorts/recursive_mergesort_array.py) +- [Recursive Quick Sort](sorts/recursive_quick_sort.py) +- [Selection Sort](sorts/selection_sort.py) +- [Shell Sort](sorts/shell_sort.py) +- [Shrink Shell Sort](sorts/shrink_shell_sort.py) +- [Slowsort](sorts/slowsort.py) +- [Stooge Sort](sorts/stooge_sort.py) +- [Strand Sort](sorts/strand_sort.py) +- [Tim Sort](sorts/tim_sort.py) +- [Topological Sort](sorts/topological_sort.py) +- [Tree Sort](sorts/tree_sort.py) +- [Unknown Sort](sorts/unknown_sort.py) +- [Wiggle Sort](sorts/wiggle_sort.py) ## Strings - * [Aho Corasick](strings/aho_corasick.py) - * [Alternative String Arrange](strings/alternative_string_arrange.py) - * [Anagrams](strings/anagrams.py) - * [Autocomplete Using Trie](strings/autocomplete_using_trie.py) - * [Barcode Validator](strings/barcode_validator.py) - * [Boyer Moore Search](strings/boyer_moore_search.py) - * [Can String Be Rearranged As Palindrome](strings/can_string_be_rearranged_as_palindrome.py) - * [Capitalize](strings/capitalize.py) - * [Check Anagrams](strings/check_anagrams.py) - * [Check Pangram](strings/check_pangram.py) - * [Credit Card Validator](strings/credit_card_validator.py) - * [Detecting English Programmatically](strings/detecting_english_programmatically.py) - * [Dna](strings/dna.py) - * [Frequency Finder](strings/frequency_finder.py) - * [Hamming Distance](strings/hamming_distance.py) - * [Indian Phone Validator](strings/indian_phone_validator.py) - * [Is Contains Unique Chars](strings/is_contains_unique_chars.py) - * [Is Palindrome](strings/is_palindrome.py) - * [Jaro Winkler](strings/jaro_winkler.py) - * [Join](strings/join.py) - * [Knuth Morris Pratt](strings/knuth_morris_pratt.py) - * [Levenshtein Distance](strings/levenshtein_distance.py) - * [Lower](strings/lower.py) - * [Manacher](strings/manacher.py) - * [Min Cost String Conversion](strings/min_cost_string_conversion.py) - * [Naive String Search](strings/naive_string_search.py) - * [Ngram](strings/ngram.py) - * [Palindrome](strings/palindrome.py) - * [Prefix Function](strings/prefix_function.py) - * [Rabin Karp](strings/rabin_karp.py) - * [Remove Duplicate](strings/remove_duplicate.py) - * [Reverse Letters](strings/reverse_letters.py) - * [Reverse Long Words](strings/reverse_long_words.py) - * [Reverse Words](strings/reverse_words.py) - * [Snake Case To Camel Pascal Case](strings/snake_case_to_camel_pascal_case.py) - * [Split](strings/split.py) - * [Upper](strings/upper.py) - * [Wave](strings/wave.py) - * [Wildcard Pattern Matching](strings/wildcard_pattern_matching.py) - * [Word Occurrence](strings/word_occurrence.py) - * [Word Patterns](strings/word_patterns.py) - * [Z Function](strings/z_function.py) + +- [Aho Corasick](strings/aho_corasick.py) +- [Alternative String Arrange](strings/alternative_string_arrange.py) +- [Anagrams](strings/anagrams.py) +- [Autocomplete Using Trie](strings/autocomplete_using_trie.py) +- [Barcode Validator](strings/barcode_validator.py) +- [Boyer Moore Search](strings/boyer_moore_search.py) +- [Can String Be Rearranged As Palindrome](strings/can_string_be_rearranged_as_palindrome.py) +- [Capitalize](strings/capitalize.py) +- [Check Anagrams](strings/check_anagrams.py) +- [Check Pangram](strings/check_pangram.py) +- [Credit Card Validator](strings/credit_card_validator.py) +- [Detecting English Programmatically](strings/detecting_english_programmatically.py) +- [Dna](strings/dna.py) +- [Frequency Finder](strings/frequency_finder.py) +- [Hamming Distance](strings/hamming_distance.py) +- [Indian Phone Validator](strings/indian_phone_validator.py) +- [Is Contains Unique Chars](strings/is_contains_unique_chars.py) +- [Is Palindrome](strings/is_palindrome.py) +- [Jaro Winkler](strings/jaro_winkler.py) +- [Join](strings/join.py) +- [Knuth Morris Pratt](strings/knuth_morris_pratt.py) +- [Levenshtein Distance](strings/levenshtein_distance.py) +- [Lower](strings/lower.py) +- [Manacher](strings/manacher.py) +- [Min Cost String Conversion](strings/min_cost_string_conversion.py) +- [Naive String Search](strings/naive_string_search.py) +- [Ngram](strings/ngram.py) +- [Palindrome](strings/palindrome.py) +- [Prefix Function](strings/prefix_function.py) +- [Rabin Karp](strings/rabin_karp.py) +- [Remove Duplicate](strings/remove_duplicate.py) +- [Reverse Letters](strings/reverse_letters.py) +- [Reverse Long Words](strings/reverse_long_words.py) +- [Reverse Words](strings/reverse_words.py) +- [Snake Case To Camel Pascal Case](strings/snake_case_to_camel_pascal_case.py) +- [Split](strings/split.py) +- [Upper](strings/upper.py) +- [Wave](strings/wave.py) +- [Wildcard Pattern Matching](strings/wildcard_pattern_matching.py) +- [Word Occurrence](strings/word_occurrence.py) +- [Word Patterns](strings/word_patterns.py) +- [Z Function](strings/z_function.py) ## Web Programming - * [Co2 Emission](web_programming/co2_emission.py) - * [Covid Stats Via Xpath](web_programming/covid_stats_via_xpath.py) - * [Crawl Google Results](web_programming/crawl_google_results.py) - * [Crawl Google Scholar Citation](web_programming/crawl_google_scholar_citation.py) - * [Currency Converter](web_programming/currency_converter.py) - * [Current Stock Price](web_programming/current_stock_price.py) - * [Current Weather](web_programming/current_weather.py) - * [Daily Horoscope](web_programming/daily_horoscope.py) - * [Download Images From Google Query](web_programming/download_images_from_google_query.py) - * [Emails From Url](web_programming/emails_from_url.py) - * [Fetch Anime And Play](web_programming/fetch_anime_and_play.py) - * [Fetch Bbc News](web_programming/fetch_bbc_news.py) - * [Fetch Github Info](web_programming/fetch_github_info.py) - * [Fetch Jobs](web_programming/fetch_jobs.py) - * [Fetch Quotes](web_programming/fetch_quotes.py) - * [Fetch Well Rx Price](web_programming/fetch_well_rx_price.py) - * [Get Imdb Top 250 Movies Csv](web_programming/get_imdb_top_250_movies_csv.py) - * [Get Imdbtop](web_programming/get_imdbtop.py) - * [Get Top Hn Posts](web_programming/get_top_hn_posts.py) - * [Get User Tweets](web_programming/get_user_tweets.py) - * [Giphy](web_programming/giphy.py) - * [Instagram Crawler](web_programming/instagram_crawler.py) - * [Instagram Pic](web_programming/instagram_pic.py) - * [Instagram Video](web_programming/instagram_video.py) - * [Nasa Data](web_programming/nasa_data.py) - * [Open Google Results](web_programming/open_google_results.py) - * [Random Anime Character](web_programming/random_anime_character.py) - * [Recaptcha Verification](web_programming/recaptcha_verification.py) - * [Reddit](web_programming/reddit.py) - * [Search Books By Isbn](web_programming/search_books_by_isbn.py) - * [Slack Message](web_programming/slack_message.py) - * [Test Fetch Github Info](web_programming/test_fetch_github_info.py) - * [World Covid19 Stats](web_programming/world_covid19_stats.py) + +- [Co2 Emission](web_programming/co2_emission.py) +- [Covid Stats Via Xpath](web_programming/covid_stats_via_xpath.py) +- [Crawl Google Results](web_programming/crawl_google_results.py) +- [Crawl Google Scholar Citation](web_programming/crawl_google_scholar_citation.py) +- [Currency Converter](web_programming/currency_converter.py) +- [Current Stock Price](web_programming/current_stock_price.py) +- [Current Weather](web_programming/current_weather.py) +- [Daily Horoscope](web_programming/daily_horoscope.py) +- [Download Images From Google Query](web_programming/download_images_from_google_query.py) +- [Emails From Url](web_programming/emails_from_url.py) +- [Fetch Anime And Play](web_programming/fetch_anime_and_play.py) +- [Fetch Bbc News](web_programming/fetch_bbc_news.py) +- [Fetch Github Info](web_programming/fetch_github_info.py) +- [Fetch Jobs](web_programming/fetch_jobs.py) +- [Fetch Quotes](web_programming/fetch_quotes.py) +- [Fetch Well Rx Price](web_programming/fetch_well_rx_price.py) +- [Get Imdb Top 250 Movies Csv](web_programming/get_imdb_top_250_movies_csv.py) +- [Get Imdbtop](web_programming/get_imdbtop.py) +- [Get Top Hn Posts](web_programming/get_top_hn_posts.py) +- [Get User Tweets](web_programming/get_user_tweets.py) +- [Giphy](web_programming/giphy.py) +- [Instagram Crawler](web_programming/instagram_crawler.py) +- [Instagram Pic](web_programming/instagram_pic.py) +- [Instagram Video](web_programming/instagram_video.py) +- [Nasa Data](web_programming/nasa_data.py) +- [Open Google Results](web_programming/open_google_results.py) +- [Random Anime Character](web_programming/random_anime_character.py) +- [Recaptcha Verification](web_programming/recaptcha_verification.py) +- [Reddit](web_programming/reddit.py) +- [Search Books By Isbn](web_programming/search_books_by_isbn.py) +- [Slack Message](web_programming/slack_message.py) +- [Test Fetch Github Info](web_programming/test_fetch_github_info.py) +- [World Covid19 Stats](web_programming/world_covid19_stats.py) diff --git a/other/pascal_triangle.py b/other/pascal_triangle.py new file mode 100644 index 000000000000..53c9cacd1317 --- /dev/null +++ b/other/pascal_triangle.py @@ -0,0 +1,54 @@ +""" +wissamfawaz12@gmail.com | github.com/wissamfawaz +This implementation demonstrates how to generate the +elements of a Pascal's triangle. +What is Pascal's triangle? +- Refer to (https://en.wikipedia.org/wiki/Pascal%27s_triangle) +for more info about this triangle. +""" + + +def generate_pascal_triangle(num_rows): + """ + Print Pascal's triangle for different number of rows + >>> generate_triangle(1) + [[1]] + >>> generate_triangle(2) + [[1], [1, 1]] + >>> generate_triangle(3) + [[1], [1, 1], [1, 2, 1]] + >>> generate_triangle(4) + [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]] + >>> generate_triangle(5) + [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]] + """ + triangle = [] + for current_row_idx in range(num_rows): + populate_current_row(triangle, current_row_idx) + print(triangle) + + +def populate_current_row(triangle, current_row_idx): + current_row = [None] * (current_row_idx + 1) + # first and last elements of current row are equal to 1 + current_row[0], current_row[-1] = 1, 1 + for current_col_idx in range(1, current_row_idx): + calculate_current_element( + triangle, current_row, current_row_idx, current_col_idx + ) + triangle.append(current_row) + + +def calculate_current_element(triangle, current_row, current_row_idx, current_col_idx): + above_to_left_elt = triangle[current_row_idx - 1][current_col_idx - 1] + above_to_right_elt = triangle[current_row_idx - 1][current_col_idx] + current_row[current_col_idx] = above_to_left_elt + above_to_right_elt + + +def main(): + num_rows = int(input("Rows count of Pascal's triangle: ").strip()) + generate_pascal_triangle(num_rows) + + +if __name__ == "__main__": + main() From 2c89234dae2167f214a7cadd1735cd14606c7f6e Mon Sep 17 00:00:00 2001 From: Wissam Fawaz Date: Sun, 16 Oct 2022 10:15:27 +0300 Subject: [PATCH 02/12] Added Pascal triangle implementation to the other folder. --- other/pascal_triangle.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/other/pascal_triangle.py b/other/pascal_triangle.py index 53c9cacd1317..ebbf6f9a6c6c 100644 --- a/other/pascal_triangle.py +++ b/other/pascal_triangle.py @@ -8,7 +8,7 @@ """ -def generate_pascal_triangle(num_rows): +def generate_pascal_triangle(num_rows: int) -> None: """ Print Pascal's triangle for different number of rows >>> generate_triangle(1) @@ -22,14 +22,14 @@ def generate_pascal_triangle(num_rows): >>> generate_triangle(5) [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]] """ - triangle = [] + triangle: list[list[int]] = [] for current_row_idx in range(num_rows): populate_current_row(triangle, current_row_idx) print(triangle) -def populate_current_row(triangle, current_row_idx): - current_row = [None] * (current_row_idx + 1) +def populate_current_row(triangle: list[list[int]], current_row_idx: int) -> None: + current_row = [-1] * (current_row_idx + 1) # first and last elements of current row are equal to 1 current_row[0], current_row[-1] = 1, 1 for current_col_idx in range(1, current_row_idx): @@ -39,13 +39,18 @@ def populate_current_row(triangle, current_row_idx): triangle.append(current_row) -def calculate_current_element(triangle, current_row, current_row_idx, current_col_idx): +def calculate_current_element( + triangle: list[list[int]], + current_row: list[int], + current_row_idx: int, + current_col_idx: int, +) -> None: above_to_left_elt = triangle[current_row_idx - 1][current_col_idx - 1] above_to_right_elt = triangle[current_row_idx - 1][current_col_idx] current_row[current_col_idx] = above_to_left_elt + above_to_right_elt -def main(): +def main() -> None: num_rows = int(input("Rows count of Pascal's triangle: ").strip()) generate_pascal_triangle(num_rows) From 1a6643bf18b7ea66104281f1e839b4229b537c43 Mon Sep 17 00:00:00 2001 From: Wissam Fawaz Date: Sun, 16 Oct 2022 14:06:57 +0300 Subject: [PATCH 03/12] Added Pascal triangle implementation to the other folder. --- other/pascal_triangle.py | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/other/pascal_triangle.py b/other/pascal_triangle.py index ebbf6f9a6c6c..4fcbd1220222 100644 --- a/other/pascal_triangle.py +++ b/other/pascal_triangle.py @@ -11,15 +11,15 @@ def generate_pascal_triangle(num_rows: int) -> None: """ Print Pascal's triangle for different number of rows - >>> generate_triangle(1) + >>> generate_pascal_triangle(1) [[1]] - >>> generate_triangle(2) + >>> generate_pascal_triangle(2) [[1], [1, 1]] - >>> generate_triangle(3) + >>> generate_pascal_triangle(3) [[1], [1, 1], [1, 2, 1]] - >>> generate_triangle(4) + >>> generate_pascal_triangle(4) [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]] - >>> generate_triangle(5) + >>> generate_pascal_triangle(5) [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]] """ triangle: list[list[int]] = [] @@ -29,6 +29,15 @@ def generate_pascal_triangle(num_rows: int) -> None: def populate_current_row(triangle: list[list[int]], current_row_idx: int) -> None: + """ + >>> triangle = [[1]] + >>> populate_current_row(triangle, 1) + >>> triangle + [[1], [1, 1]] + >>> populate_current_row(triangle, 2) + >>> triangle + [[1], [1, 1], [1, 2, 1]] + """ current_row = [-1] * (current_row_idx + 1) # first and last elements of current row are equal to 1 current_row[0], current_row[-1] = 1, 1 @@ -45,6 +54,13 @@ def calculate_current_element( current_row_idx: int, current_col_idx: int, ) -> None: + """ + >>> triangle = [[1], [1, 1]] + >>> current_row = [1, -1, 1] + >>> calculate_current_element(triangle, current_row, 2, 1) + >>> current_row + [1, 2, 1] + """ above_to_left_elt = triangle[current_row_idx - 1][current_col_idx - 1] above_to_right_elt = triangle[current_row_idx - 1][current_col_idx] current_row[current_col_idx] = above_to_left_elt + above_to_right_elt @@ -56,4 +72,6 @@ def main() -> None: if __name__ == "__main__": - main() + import doctest + + doctest.testmod() From c6a623b479d5694b3d452ea49e27f50c9fa86f99 Mon Sep 17 00:00:00 2001 From: Wissam Fawaz Date: Sun, 16 Oct 2022 14:12:01 +0300 Subject: [PATCH 04/12] Added Pascal triangle implementation to the other folder. --- other/pascal_triangle.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/other/pascal_triangle.py b/other/pascal_triangle.py index 4fcbd1220222..494d5c658d07 100644 --- a/other/pascal_triangle.py +++ b/other/pascal_triangle.py @@ -66,11 +66,6 @@ def calculate_current_element( current_row[current_col_idx] = above_to_left_elt + above_to_right_elt -def main() -> None: - num_rows = int(input("Rows count of Pascal's triangle: ").strip()) - generate_pascal_triangle(num_rows) - - if __name__ == "__main__": import doctest From c396c3a49ef630a15df40783fe1338f011cacf78 Mon Sep 17 00:00:00 2001 From: Wissam Fawaz Date: Sun, 16 Oct 2022 14:46:50 +0300 Subject: [PATCH 05/12] Implemented a Pascal triangle generator. --- DIRECTORY.md | 1 - other/pascal_triangle.py | 17 +++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/DIRECTORY.md b/DIRECTORY.md index 53035f1b9426..4b25d66fcbfb 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -652,7 +652,6 @@ ## Other -- [Pascal Triangle](other/pascal_triangle.py) - [Activity Selection](other/activity_selection.py) - [Alternative List Arrange](other/alternative_list_arrange.py) - [Check Strong Password](other/check_strong_password.py) diff --git a/other/pascal_triangle.py b/other/pascal_triangle.py index 494d5c658d07..48fbe6231b46 100644 --- a/other/pascal_triangle.py +++ b/other/pascal_triangle.py @@ -8,7 +8,7 @@ """ -def generate_pascal_triangle(num_rows: int) -> None: +def generate_pascal_triangle(num_rows: int) -> list[list[int]]: """ Print Pascal's triangle for different number of rows >>> generate_pascal_triangle(1) @@ -24,19 +24,16 @@ def generate_pascal_triangle(num_rows: int) -> None: """ triangle: list[list[int]] = [] for current_row_idx in range(num_rows): - populate_current_row(triangle, current_row_idx) - print(triangle) + current_row = populate_current_row(triangle, current_row_idx) + triangle.append(current_row) + return triangle -def populate_current_row(triangle: list[list[int]], current_row_idx: int) -> None: +def populate_current_row(triangle: list[list[int]], current_row_idx: int) -> list[int]: """ >>> triangle = [[1]] >>> populate_current_row(triangle, 1) - >>> triangle - [[1], [1, 1]] - >>> populate_current_row(triangle, 2) - >>> triangle - [[1], [1, 1], [1, 2, 1]] + [1, 1] """ current_row = [-1] * (current_row_idx + 1) # first and last elements of current row are equal to 1 @@ -45,7 +42,7 @@ def populate_current_row(triangle: list[list[int]], current_row_idx: int) -> Non calculate_current_element( triangle, current_row, current_row_idx, current_col_idx ) - triangle.append(current_row) + return current_row def calculate_current_element( From f9c7e31eda513434bfaa5b71963a5c7c296b1e54 Mon Sep 17 00:00:00 2001 From: Wissam Fawaz <55150850+wissamfawaz@users.noreply.github.com> Date: Sun, 16 Oct 2022 15:41:37 +0300 Subject: [PATCH 06/12] Reversed Changes to DIRECTORY.md --- DIRECTORY.md | 2055 +++++++++++++++++++++++++------------------------- 1 file changed, 1007 insertions(+), 1048 deletions(-) diff --git a/DIRECTORY.md b/DIRECTORY.md index 4b25d66fcbfb..92bed9cb4c6e 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -1,1131 +1,1090 @@ -## Arithmetic Analysis -- [Bisection](arithmetic_analysis/bisection.py) -- [Gaussian Elimination](arithmetic_analysis/gaussian_elimination.py) -- [In Static Equilibrium](arithmetic_analysis/in_static_equilibrium.py) -- [Intersection](arithmetic_analysis/intersection.py) -- [Jacobi Iteration Method](arithmetic_analysis/jacobi_iteration_method.py) -- [Lu Decomposition](arithmetic_analysis/lu_decomposition.py) -- [Newton Forward Interpolation](arithmetic_analysis/newton_forward_interpolation.py) -- [Newton Method](arithmetic_analysis/newton_method.py) -- [Newton Raphson](arithmetic_analysis/newton_raphson.py) -- [Newton Raphson New](arithmetic_analysis/newton_raphson_new.py) -- [Secant Method](arithmetic_analysis/secant_method.py) +## Arithmetic Analysis + * [Bisection](arithmetic_analysis/bisection.py) + * [Gaussian Elimination](arithmetic_analysis/gaussian_elimination.py) + * [In Static Equilibrium](arithmetic_analysis/in_static_equilibrium.py) + * [Intersection](arithmetic_analysis/intersection.py) + * [Jacobi Iteration Method](arithmetic_analysis/jacobi_iteration_method.py) + * [Lu Decomposition](arithmetic_analysis/lu_decomposition.py) + * [Newton Forward Interpolation](arithmetic_analysis/newton_forward_interpolation.py) + * [Newton Method](arithmetic_analysis/newton_method.py) + * [Newton Raphson](arithmetic_analysis/newton_raphson.py) + * [Newton Raphson New](arithmetic_analysis/newton_raphson_new.py) + * [Secant Method](arithmetic_analysis/secant_method.py) ## Audio Filters - -- [Butterworth Filter](audio_filters/butterworth_filter.py) -- [Equal Loudness Filter](audio_filters/equal_loudness_filter.py) -- [Iir Filter](audio_filters/iir_filter.py) -- [Show Response](audio_filters/show_response.py) + * [Butterworth Filter](audio_filters/butterworth_filter.py) + * [Equal Loudness Filter](audio_filters/equal_loudness_filter.py) + * [Iir Filter](audio_filters/iir_filter.py) + * [Show Response](audio_filters/show_response.py) ## Backtracking - -- [All Combinations](backtracking/all_combinations.py) -- [All Permutations](backtracking/all_permutations.py) -- [All Subsequences](backtracking/all_subsequences.py) -- [Coloring](backtracking/coloring.py) -- [Hamiltonian Cycle](backtracking/hamiltonian_cycle.py) -- [Knight Tour](backtracking/knight_tour.py) -- [Minimax](backtracking/minimax.py) -- [N Queens](backtracking/n_queens.py) -- [N Queens Math](backtracking/n_queens_math.py) -- [Rat In Maze](backtracking/rat_in_maze.py) -- [Sudoku](backtracking/sudoku.py) -- [Sum Of Subsets](backtracking/sum_of_subsets.py) + * [All Combinations](backtracking/all_combinations.py) + * [All Permutations](backtracking/all_permutations.py) + * [All Subsequences](backtracking/all_subsequences.py) + * [Coloring](backtracking/coloring.py) + * [Hamiltonian Cycle](backtracking/hamiltonian_cycle.py) + * [Knight Tour](backtracking/knight_tour.py) + * [Minimax](backtracking/minimax.py) + * [N Queens](backtracking/n_queens.py) + * [N Queens Math](backtracking/n_queens_math.py) + * [Rat In Maze](backtracking/rat_in_maze.py) + * [Sudoku](backtracking/sudoku.py) + * [Sum Of Subsets](backtracking/sum_of_subsets.py) ## Bit Manipulation - -- [Binary And Operator](bit_manipulation/binary_and_operator.py) -- [Binary Count Setbits](bit_manipulation/binary_count_setbits.py) -- [Binary Count Trailing Zeros](bit_manipulation/binary_count_trailing_zeros.py) -- [Binary Or Operator](bit_manipulation/binary_or_operator.py) -- [Binary Shifts](bit_manipulation/binary_shifts.py) -- [Binary Twos Complement](bit_manipulation/binary_twos_complement.py) -- [Binary Xor Operator](bit_manipulation/binary_xor_operator.py) -- [Count 1S Brian Kernighan Method](bit_manipulation/count_1s_brian_kernighan_method.py) -- [Count Number Of One Bits](bit_manipulation/count_number_of_one_bits.py) -- [Gray Code Sequence](bit_manipulation/gray_code_sequence.py) -- [Reverse Bits](bit_manipulation/reverse_bits.py) -- [Single Bit Manipulation Operations](bit_manipulation/single_bit_manipulation_operations.py) + * [Binary And Operator](bit_manipulation/binary_and_operator.py) + * [Binary Count Setbits](bit_manipulation/binary_count_setbits.py) + * [Binary Count Trailing Zeros](bit_manipulation/binary_count_trailing_zeros.py) + * [Binary Or Operator](bit_manipulation/binary_or_operator.py) + * [Binary Shifts](bit_manipulation/binary_shifts.py) + * [Binary Twos Complement](bit_manipulation/binary_twos_complement.py) + * [Binary Xor Operator](bit_manipulation/binary_xor_operator.py) + * [Count 1S Brian Kernighan Method](bit_manipulation/count_1s_brian_kernighan_method.py) + * [Count Number Of One Bits](bit_manipulation/count_number_of_one_bits.py) + * [Gray Code Sequence](bit_manipulation/gray_code_sequence.py) + * [Reverse Bits](bit_manipulation/reverse_bits.py) + * [Single Bit Manipulation Operations](bit_manipulation/single_bit_manipulation_operations.py) ## Blockchain - -- [Chinese Remainder Theorem](blockchain/chinese_remainder_theorem.py) -- [Diophantine Equation](blockchain/diophantine_equation.py) -- [Modular Division](blockchain/modular_division.py) + * [Chinese Remainder Theorem](blockchain/chinese_remainder_theorem.py) + * [Diophantine Equation](blockchain/diophantine_equation.py) + * [Modular Division](blockchain/modular_division.py) ## Boolean Algebra - -- [Norgate](boolean_algebra/norgate.py) -- [Quine Mc Cluskey](boolean_algebra/quine_mc_cluskey.py) + * [Norgate](boolean_algebra/norgate.py) + * [Quine Mc Cluskey](boolean_algebra/quine_mc_cluskey.py) ## Cellular Automata - -- [Conways Game Of Life](cellular_automata/conways_game_of_life.py) -- [Game Of Life](cellular_automata/game_of_life.py) -- [Nagel Schrekenberg](cellular_automata/nagel_schrekenberg.py) -- [One Dimensional](cellular_automata/one_dimensional.py) + * [Conways Game Of Life](cellular_automata/conways_game_of_life.py) + * [Game Of Life](cellular_automata/game_of_life.py) + * [Nagel Schrekenberg](cellular_automata/nagel_schrekenberg.py) + * [One Dimensional](cellular_automata/one_dimensional.py) ## Ciphers - -- [A1Z26](ciphers/a1z26.py) -- [Affine Cipher](ciphers/affine_cipher.py) -- [Atbash](ciphers/atbash.py) -- [Baconian Cipher](ciphers/baconian_cipher.py) -- [Base16](ciphers/base16.py) -- [Base32](ciphers/base32.py) -- [Base64](ciphers/base64.py) -- [Base85](ciphers/base85.py) -- [Beaufort Cipher](ciphers/beaufort_cipher.py) -- [Bifid](ciphers/bifid.py) -- [Brute Force Caesar Cipher](ciphers/brute_force_caesar_cipher.py) -- [Caesar Cipher](ciphers/caesar_cipher.py) -- [Cryptomath Module](ciphers/cryptomath_module.py) -- [Decrypt Caesar With Chi Squared](ciphers/decrypt_caesar_with_chi_squared.py) -- [Deterministic Miller Rabin](ciphers/deterministic_miller_rabin.py) -- [Diffie](ciphers/diffie.py) -- [Diffie Hellman](ciphers/diffie_hellman.py) -- [Elgamal Key Generator](ciphers/elgamal_key_generator.py) -- [Enigma Machine2](ciphers/enigma_machine2.py) -- [Hill Cipher](ciphers/hill_cipher.py) -- [Mixed Keyword Cypher](ciphers/mixed_keyword_cypher.py) -- [Mono Alphabetic Ciphers](ciphers/mono_alphabetic_ciphers.py) -- [Morse Code](ciphers/morse_code.py) -- [Onepad Cipher](ciphers/onepad_cipher.py) -- [Playfair Cipher](ciphers/playfair_cipher.py) -- [Polybius](ciphers/polybius.py) -- [Porta Cipher](ciphers/porta_cipher.py) -- [Rabin Miller](ciphers/rabin_miller.py) -- [Rail Fence Cipher](ciphers/rail_fence_cipher.py) -- [Rot13](ciphers/rot13.py) -- [Rsa Cipher](ciphers/rsa_cipher.py) -- [Rsa Factorization](ciphers/rsa_factorization.py) -- [Rsa Key Generator](ciphers/rsa_key_generator.py) -- [Shuffled Shift Cipher](ciphers/shuffled_shift_cipher.py) -- [Simple Keyword Cypher](ciphers/simple_keyword_cypher.py) -- [Simple Substitution Cipher](ciphers/simple_substitution_cipher.py) -- [Trafid Cipher](ciphers/trafid_cipher.py) -- [Transposition Cipher](ciphers/transposition_cipher.py) -- [Transposition Cipher Encrypt Decrypt File](ciphers/transposition_cipher_encrypt_decrypt_file.py) -- [Vigenere Cipher](ciphers/vigenere_cipher.py) -- [Xor Cipher](ciphers/xor_cipher.py) + * [A1Z26](ciphers/a1z26.py) + * [Affine Cipher](ciphers/affine_cipher.py) + * [Atbash](ciphers/atbash.py) + * [Baconian Cipher](ciphers/baconian_cipher.py) + * [Base16](ciphers/base16.py) + * [Base32](ciphers/base32.py) + * [Base64](ciphers/base64.py) + * [Base85](ciphers/base85.py) + * [Beaufort Cipher](ciphers/beaufort_cipher.py) + * [Bifid](ciphers/bifid.py) + * [Brute Force Caesar Cipher](ciphers/brute_force_caesar_cipher.py) + * [Caesar Cipher](ciphers/caesar_cipher.py) + * [Cryptomath Module](ciphers/cryptomath_module.py) + * [Decrypt Caesar With Chi Squared](ciphers/decrypt_caesar_with_chi_squared.py) + * [Deterministic Miller Rabin](ciphers/deterministic_miller_rabin.py) + * [Diffie](ciphers/diffie.py) + * [Diffie Hellman](ciphers/diffie_hellman.py) + * [Elgamal Key Generator](ciphers/elgamal_key_generator.py) + * [Enigma Machine2](ciphers/enigma_machine2.py) + * [Hill Cipher](ciphers/hill_cipher.py) + * [Mixed Keyword Cypher](ciphers/mixed_keyword_cypher.py) + * [Mono Alphabetic Ciphers](ciphers/mono_alphabetic_ciphers.py) + * [Morse Code](ciphers/morse_code.py) + * [Onepad Cipher](ciphers/onepad_cipher.py) + * [Playfair Cipher](ciphers/playfair_cipher.py) + * [Polybius](ciphers/polybius.py) + * [Porta Cipher](ciphers/porta_cipher.py) + * [Rabin Miller](ciphers/rabin_miller.py) + * [Rail Fence Cipher](ciphers/rail_fence_cipher.py) + * [Rot13](ciphers/rot13.py) + * [Rsa Cipher](ciphers/rsa_cipher.py) + * [Rsa Factorization](ciphers/rsa_factorization.py) + * [Rsa Key Generator](ciphers/rsa_key_generator.py) + * [Shuffled Shift Cipher](ciphers/shuffled_shift_cipher.py) + * [Simple Keyword Cypher](ciphers/simple_keyword_cypher.py) + * [Simple Substitution Cipher](ciphers/simple_substitution_cipher.py) + * [Trafid Cipher](ciphers/trafid_cipher.py) + * [Transposition Cipher](ciphers/transposition_cipher.py) + * [Transposition Cipher Encrypt Decrypt File](ciphers/transposition_cipher_encrypt_decrypt_file.py) + * [Vigenere Cipher](ciphers/vigenere_cipher.py) + * [Xor Cipher](ciphers/xor_cipher.py) ## Compression - -- [Burrows Wheeler](compression/burrows_wheeler.py) -- [Huffman](compression/huffman.py) -- [Lempel Ziv](compression/lempel_ziv.py) -- [Lempel Ziv Decompress](compression/lempel_ziv_decompress.py) -- [Peak Signal To Noise Ratio](compression/peak_signal_to_noise_ratio.py) -- [Run Length Encoding](compression/run_length_encoding.py) + * [Burrows Wheeler](compression/burrows_wheeler.py) + * [Huffman](compression/huffman.py) + * [Lempel Ziv](compression/lempel_ziv.py) + * [Lempel Ziv Decompress](compression/lempel_ziv_decompress.py) + * [Peak Signal To Noise Ratio](compression/peak_signal_to_noise_ratio.py) + * [Run Length Encoding](compression/run_length_encoding.py) ## Computer Vision - -- [Cnn Classification](computer_vision/cnn_classification.py) -- [Flip Augmentation](computer_vision/flip_augmentation.py) -- [Harris Corner](computer_vision/harris_corner.py) -- [Horn Schunck](computer_vision/horn_schunck.py) -- [Mean Threshold](computer_vision/mean_threshold.py) -- [Mosaic Augmentation](computer_vision/mosaic_augmentation.py) -- [Pooling Functions](computer_vision/pooling_functions.py) + * [Cnn Classification](computer_vision/cnn_classification.py) + * [Flip Augmentation](computer_vision/flip_augmentation.py) + * [Harris Corner](computer_vision/harris_corner.py) + * [Horn Schunck](computer_vision/horn_schunck.py) + * [Mean Threshold](computer_vision/mean_threshold.py) + * [Mosaic Augmentation](computer_vision/mosaic_augmentation.py) + * [Pooling Functions](computer_vision/pooling_functions.py) ## Conversions - -- [Astronomical Length Scale Conversion](conversions/astronomical_length_scale_conversion.py) -- [Binary To Decimal](conversions/binary_to_decimal.py) -- [Binary To Hexadecimal](conversions/binary_to_hexadecimal.py) -- [Binary To Octal](conversions/binary_to_octal.py) -- [Decimal To Any](conversions/decimal_to_any.py) -- [Decimal To Binary](conversions/decimal_to_binary.py) -- [Decimal To Binary Recursion](conversions/decimal_to_binary_recursion.py) -- [Decimal To Hexadecimal](conversions/decimal_to_hexadecimal.py) -- [Decimal To Octal](conversions/decimal_to_octal.py) -- [Excel Title To Column](conversions/excel_title_to_column.py) -- [Hex To Bin](conversions/hex_to_bin.py) -- [Hexadecimal To Decimal](conversions/hexadecimal_to_decimal.py) -- [Length Conversion](conversions/length_conversion.py) -- [Molecular Chemistry](conversions/molecular_chemistry.py) -- [Octal To Decimal](conversions/octal_to_decimal.py) -- [Prefix Conversions](conversions/prefix_conversions.py) -- [Prefix Conversions String](conversions/prefix_conversions_string.py) -- [Pressure Conversions](conversions/pressure_conversions.py) -- [Rgb Hsv Conversion](conversions/rgb_hsv_conversion.py) -- [Roman Numerals](conversions/roman_numerals.py) -- [Speed Conversions](conversions/speed_conversions.py) -- [Temperature Conversions](conversions/temperature_conversions.py) -- [Volume Conversions](conversions/volume_conversions.py) -- [Weight Conversion](conversions/weight_conversion.py) + * [Astronomical Length Scale Conversion](conversions/astronomical_length_scale_conversion.py) + * [Binary To Decimal](conversions/binary_to_decimal.py) + * [Binary To Hexadecimal](conversions/binary_to_hexadecimal.py) + * [Binary To Octal](conversions/binary_to_octal.py) + * [Decimal To Any](conversions/decimal_to_any.py) + * [Decimal To Binary](conversions/decimal_to_binary.py) + * [Decimal To Binary Recursion](conversions/decimal_to_binary_recursion.py) + * [Decimal To Hexadecimal](conversions/decimal_to_hexadecimal.py) + * [Decimal To Octal](conversions/decimal_to_octal.py) + * [Excel Title To Column](conversions/excel_title_to_column.py) + * [Hex To Bin](conversions/hex_to_bin.py) + * [Hexadecimal To Decimal](conversions/hexadecimal_to_decimal.py) + * [Length Conversion](conversions/length_conversion.py) + * [Molecular Chemistry](conversions/molecular_chemistry.py) + * [Octal To Decimal](conversions/octal_to_decimal.py) + * [Prefix Conversions](conversions/prefix_conversions.py) + * [Prefix Conversions String](conversions/prefix_conversions_string.py) + * [Pressure Conversions](conversions/pressure_conversions.py) + * [Rgb Hsv Conversion](conversions/rgb_hsv_conversion.py) + * [Roman Numerals](conversions/roman_numerals.py) + * [Speed Conversions](conversions/speed_conversions.py) + * [Temperature Conversions](conversions/temperature_conversions.py) + * [Volume Conversions](conversions/volume_conversions.py) + * [Weight Conversion](conversions/weight_conversion.py) ## Data Structures - -- Binary Tree - - [Avl Tree](data_structures/binary_tree/avl_tree.py) - - [Basic Binary Tree](data_structures/binary_tree/basic_binary_tree.py) - - [Binary Search Tree](data_structures/binary_tree/binary_search_tree.py) - - [Binary Search Tree Recursive](data_structures/binary_tree/binary_search_tree_recursive.py) - - [Binary Tree Mirror](data_structures/binary_tree/binary_tree_mirror.py) - - [Binary Tree Node Sum](data_structures/binary_tree/binary_tree_node_sum.py) - - [Binary Tree Traversals](data_structures/binary_tree/binary_tree_traversals.py) - - [Fenwick Tree](data_structures/binary_tree/fenwick_tree.py) - - [Inorder Tree Traversal 2022](data_structures/binary_tree/inorder_tree_traversal_2022.py) - - [Lazy Segment Tree](data_structures/binary_tree/lazy_segment_tree.py) - - [Lowest Common Ancestor](data_structures/binary_tree/lowest_common_ancestor.py) - - [Maximum Fenwick Tree](data_structures/binary_tree/maximum_fenwick_tree.py) - - [Merge Two Binary Trees](data_structures/binary_tree/merge_two_binary_trees.py) - - [Non Recursive Segment Tree](data_structures/binary_tree/non_recursive_segment_tree.py) - - [Number Of Possible Binary Trees](data_structures/binary_tree/number_of_possible_binary_trees.py) - - [Red Black Tree](data_structures/binary_tree/red_black_tree.py) - - [Segment Tree](data_structures/binary_tree/segment_tree.py) - - [Segment Tree Other](data_structures/binary_tree/segment_tree_other.py) - - [Treap](data_structures/binary_tree/treap.py) - - [Wavelet Tree](data_structures/binary_tree/wavelet_tree.py) -- Disjoint Set - - [Alternate Disjoint Set](data_structures/disjoint_set/alternate_disjoint_set.py) - - [Disjoint Set](data_structures/disjoint_set/disjoint_set.py) -- Hashing - - [Double Hash](data_structures/hashing/double_hash.py) - - [Hash Table](data_structures/hashing/hash_table.py) - - [Hash Table With Linked List](data_structures/hashing/hash_table_with_linked_list.py) - - Number Theory - - [Prime Numbers](data_structures/hashing/number_theory/prime_numbers.py) - - [Quadratic Probing](data_structures/hashing/quadratic_probing.py) -- Heap - - [Binomial Heap](data_structures/heap/binomial_heap.py) - - [Heap](data_structures/heap/heap.py) - - [Heap Generic](data_structures/heap/heap_generic.py) - - [Max Heap](data_structures/heap/max_heap.py) - - [Min Heap](data_structures/heap/min_heap.py) - - [Randomized Heap](data_structures/heap/randomized_heap.py) - - [Skew Heap](data_structures/heap/skew_heap.py) -- Linked List - - [Circular Linked List](data_structures/linked_list/circular_linked_list.py) - - [Deque Doubly](data_structures/linked_list/deque_doubly.py) - - [Doubly Linked List](data_structures/linked_list/doubly_linked_list.py) - - [Doubly Linked List Two](data_structures/linked_list/doubly_linked_list_two.py) - - [From Sequence](data_structures/linked_list/from_sequence.py) - - [Has Loop](data_structures/linked_list/has_loop.py) - - [Is Palindrome](data_structures/linked_list/is_palindrome.py) - - [Merge Two Lists](data_structures/linked_list/merge_two_lists.py) - - [Middle Element Of Linked List](data_structures/linked_list/middle_element_of_linked_list.py) - - [Print Reverse](data_structures/linked_list/print_reverse.py) - - [Singly Linked List](data_structures/linked_list/singly_linked_list.py) - - [Skip List](data_structures/linked_list/skip_list.py) - - [Swap Nodes](data_structures/linked_list/swap_nodes.py) -- Queue - - [Circular Queue](data_structures/queue/circular_queue.py) - - [Circular Queue Linked List](data_structures/queue/circular_queue_linked_list.py) - - [Double Ended Queue](data_structures/queue/double_ended_queue.py) - - [Linked Queue](data_structures/queue/linked_queue.py) - - [Priority Queue Using List](data_structures/queue/priority_queue_using_list.py) - - [Queue On List](data_structures/queue/queue_on_list.py) - - [Queue On Pseudo Stack](data_structures/queue/queue_on_pseudo_stack.py) -- Stacks - - [Balanced Parentheses](data_structures/stacks/balanced_parentheses.py) - - [Dijkstras Two Stack Algorithm](data_structures/stacks/dijkstras_two_stack_algorithm.py) - - [Evaluate Postfix Notations](data_structures/stacks/evaluate_postfix_notations.py) - - [Infix To Postfix Conversion](data_structures/stacks/infix_to_postfix_conversion.py) - - [Infix To Prefix Conversion](data_structures/stacks/infix_to_prefix_conversion.py) - - [Next Greater Element](data_structures/stacks/next_greater_element.py) - - [Postfix Evaluation](data_structures/stacks/postfix_evaluation.py) - - [Prefix Evaluation](data_structures/stacks/prefix_evaluation.py) - - [Stack](data_structures/stacks/stack.py) - - [Stack With Doubly Linked List](data_structures/stacks/stack_with_doubly_linked_list.py) - - [Stack With Singly Linked List](data_structures/stacks/stack_with_singly_linked_list.py) - - [Stock Span Problem](data_structures/stacks/stock_span_problem.py) -- Trie - - [Trie](data_structures/trie/trie.py) + * Binary Tree + * [Avl Tree](data_structures/binary_tree/avl_tree.py) + * [Basic Binary Tree](data_structures/binary_tree/basic_binary_tree.py) + * [Binary Search Tree](data_structures/binary_tree/binary_search_tree.py) + * [Binary Search Tree Recursive](data_structures/binary_tree/binary_search_tree_recursive.py) + * [Binary Tree Mirror](data_structures/binary_tree/binary_tree_mirror.py) + * [Binary Tree Node Sum](data_structures/binary_tree/binary_tree_node_sum.py) + * [Binary Tree Traversals](data_structures/binary_tree/binary_tree_traversals.py) + * [Fenwick Tree](data_structures/binary_tree/fenwick_tree.py) + * [Inorder Tree Traversal 2022](data_structures/binary_tree/inorder_tree_traversal_2022.py) + * [Lazy Segment Tree](data_structures/binary_tree/lazy_segment_tree.py) + * [Lowest Common Ancestor](data_structures/binary_tree/lowest_common_ancestor.py) + * [Maximum Fenwick Tree](data_structures/binary_tree/maximum_fenwick_tree.py) + * [Merge Two Binary Trees](data_structures/binary_tree/merge_two_binary_trees.py) + * [Non Recursive Segment Tree](data_structures/binary_tree/non_recursive_segment_tree.py) + * [Number Of Possible Binary Trees](data_structures/binary_tree/number_of_possible_binary_trees.py) + * [Red Black Tree](data_structures/binary_tree/red_black_tree.py) + * [Segment Tree](data_structures/binary_tree/segment_tree.py) + * [Segment Tree Other](data_structures/binary_tree/segment_tree_other.py) + * [Treap](data_structures/binary_tree/treap.py) + * [Wavelet Tree](data_structures/binary_tree/wavelet_tree.py) + * Disjoint Set + * [Alternate Disjoint Set](data_structures/disjoint_set/alternate_disjoint_set.py) + * [Disjoint Set](data_structures/disjoint_set/disjoint_set.py) + * Hashing + * [Double Hash](data_structures/hashing/double_hash.py) + * [Hash Table](data_structures/hashing/hash_table.py) + * [Hash Table With Linked List](data_structures/hashing/hash_table_with_linked_list.py) + * Number Theory + * [Prime Numbers](data_structures/hashing/number_theory/prime_numbers.py) + * [Quadratic Probing](data_structures/hashing/quadratic_probing.py) + * Heap + * [Binomial Heap](data_structures/heap/binomial_heap.py) + * [Heap](data_structures/heap/heap.py) + * [Heap Generic](data_structures/heap/heap_generic.py) + * [Max Heap](data_structures/heap/max_heap.py) + * [Min Heap](data_structures/heap/min_heap.py) + * [Randomized Heap](data_structures/heap/randomized_heap.py) + * [Skew Heap](data_structures/heap/skew_heap.py) + * Linked List + * [Circular Linked List](data_structures/linked_list/circular_linked_list.py) + * [Deque Doubly](data_structures/linked_list/deque_doubly.py) + * [Doubly Linked List](data_structures/linked_list/doubly_linked_list.py) + * [Doubly Linked List Two](data_structures/linked_list/doubly_linked_list_two.py) + * [From Sequence](data_structures/linked_list/from_sequence.py) + * [Has Loop](data_structures/linked_list/has_loop.py) + * [Is Palindrome](data_structures/linked_list/is_palindrome.py) + * [Merge Two Lists](data_structures/linked_list/merge_two_lists.py) + * [Middle Element Of Linked List](data_structures/linked_list/middle_element_of_linked_list.py) + * [Print Reverse](data_structures/linked_list/print_reverse.py) + * [Singly Linked List](data_structures/linked_list/singly_linked_list.py) + * [Skip List](data_structures/linked_list/skip_list.py) + * [Swap Nodes](data_structures/linked_list/swap_nodes.py) + * Queue + * [Circular Queue](data_structures/queue/circular_queue.py) + * [Circular Queue Linked List](data_structures/queue/circular_queue_linked_list.py) + * [Double Ended Queue](data_structures/queue/double_ended_queue.py) + * [Linked Queue](data_structures/queue/linked_queue.py) + * [Priority Queue Using List](data_structures/queue/priority_queue_using_list.py) + * [Queue On List](data_structures/queue/queue_on_list.py) + * [Queue On Pseudo Stack](data_structures/queue/queue_on_pseudo_stack.py) + * Stacks + * [Balanced Parentheses](data_structures/stacks/balanced_parentheses.py) + * [Dijkstras Two Stack Algorithm](data_structures/stacks/dijkstras_two_stack_algorithm.py) + * [Evaluate Postfix Notations](data_structures/stacks/evaluate_postfix_notations.py) + * [Infix To Postfix Conversion](data_structures/stacks/infix_to_postfix_conversion.py) + * [Infix To Prefix Conversion](data_structures/stacks/infix_to_prefix_conversion.py) + * [Next Greater Element](data_structures/stacks/next_greater_element.py) + * [Postfix Evaluation](data_structures/stacks/postfix_evaluation.py) + * [Prefix Evaluation](data_structures/stacks/prefix_evaluation.py) + * [Stack](data_structures/stacks/stack.py) + * [Stack With Doubly Linked List](data_structures/stacks/stack_with_doubly_linked_list.py) + * [Stack With Singly Linked List](data_structures/stacks/stack_with_singly_linked_list.py) + * [Stock Span Problem](data_structures/stacks/stock_span_problem.py) + * Trie + * [Trie](data_structures/trie/trie.py) ## Digital Image Processing - -- [Change Brightness](digital_image_processing/change_brightness.py) -- [Change Contrast](digital_image_processing/change_contrast.py) -- [Convert To Negative](digital_image_processing/convert_to_negative.py) -- Dithering - - [Burkes](digital_image_processing/dithering/burkes.py) -- Edge Detection - - [Canny](digital_image_processing/edge_detection/canny.py) -- Filters - - [Bilateral Filter](digital_image_processing/filters/bilateral_filter.py) - - [Convolve](digital_image_processing/filters/convolve.py) - - [Gabor Filter](digital_image_processing/filters/gabor_filter.py) - - [Gaussian Filter](digital_image_processing/filters/gaussian_filter.py) - - [Local Binary Pattern](digital_image_processing/filters/local_binary_pattern.py) - - [Median Filter](digital_image_processing/filters/median_filter.py) - - [Sobel Filter](digital_image_processing/filters/sobel_filter.py) -- Histogram Equalization - - [Histogram Stretch](digital_image_processing/histogram_equalization/histogram_stretch.py) -- [Index Calculation](digital_image_processing/index_calculation.py) -- Morphological Operations - - [Dilation Operation](digital_image_processing/morphological_operations/dilation_operation.py) - - [Erosion Operation](digital_image_processing/morphological_operations/erosion_operation.py) -- Resize - - [Resize](digital_image_processing/resize/resize.py) -- Rotation - - [Rotation](digital_image_processing/rotation/rotation.py) -- [Sepia](digital_image_processing/sepia.py) -- [Test Digital Image Processing](digital_image_processing/test_digital_image_processing.py) + * [Change Brightness](digital_image_processing/change_brightness.py) + * [Change Contrast](digital_image_processing/change_contrast.py) + * [Convert To Negative](digital_image_processing/convert_to_negative.py) + * Dithering + * [Burkes](digital_image_processing/dithering/burkes.py) + * Edge Detection + * [Canny](digital_image_processing/edge_detection/canny.py) + * Filters + * [Bilateral Filter](digital_image_processing/filters/bilateral_filter.py) + * [Convolve](digital_image_processing/filters/convolve.py) + * [Gabor Filter](digital_image_processing/filters/gabor_filter.py) + * [Gaussian Filter](digital_image_processing/filters/gaussian_filter.py) + * [Local Binary Pattern](digital_image_processing/filters/local_binary_pattern.py) + * [Median Filter](digital_image_processing/filters/median_filter.py) + * [Sobel Filter](digital_image_processing/filters/sobel_filter.py) + * Histogram Equalization + * [Histogram Stretch](digital_image_processing/histogram_equalization/histogram_stretch.py) + * [Index Calculation](digital_image_processing/index_calculation.py) + * Morphological Operations + * [Dilation Operation](digital_image_processing/morphological_operations/dilation_operation.py) + * [Erosion Operation](digital_image_processing/morphological_operations/erosion_operation.py) + * Resize + * [Resize](digital_image_processing/resize/resize.py) + * Rotation + * [Rotation](digital_image_processing/rotation/rotation.py) + * [Sepia](digital_image_processing/sepia.py) + * [Test Digital Image Processing](digital_image_processing/test_digital_image_processing.py) ## Divide And Conquer - -- [Closest Pair Of Points](divide_and_conquer/closest_pair_of_points.py) -- [Convex Hull](divide_and_conquer/convex_hull.py) -- [Heaps Algorithm](divide_and_conquer/heaps_algorithm.py) -- [Heaps Algorithm Iterative](divide_and_conquer/heaps_algorithm_iterative.py) -- [Inversions](divide_and_conquer/inversions.py) -- [Kth Order Statistic](divide_and_conquer/kth_order_statistic.py) -- [Max Difference Pair](divide_and_conquer/max_difference_pair.py) -- [Max Subarray Sum](divide_and_conquer/max_subarray_sum.py) -- [Mergesort](divide_and_conquer/mergesort.py) -- [Peak](divide_and_conquer/peak.py) -- [Power](divide_and_conquer/power.py) -- [Strassen Matrix Multiplication](divide_and_conquer/strassen_matrix_multiplication.py) + * [Closest Pair Of Points](divide_and_conquer/closest_pair_of_points.py) + * [Convex Hull](divide_and_conquer/convex_hull.py) + * [Heaps Algorithm](divide_and_conquer/heaps_algorithm.py) + * [Heaps Algorithm Iterative](divide_and_conquer/heaps_algorithm_iterative.py) + * [Inversions](divide_and_conquer/inversions.py) + * [Kth Order Statistic](divide_and_conquer/kth_order_statistic.py) + * [Max Difference Pair](divide_and_conquer/max_difference_pair.py) + * [Max Subarray Sum](divide_and_conquer/max_subarray_sum.py) + * [Mergesort](divide_and_conquer/mergesort.py) + * [Peak](divide_and_conquer/peak.py) + * [Power](divide_and_conquer/power.py) + * [Strassen Matrix Multiplication](divide_and_conquer/strassen_matrix_multiplication.py) ## Dynamic Programming - -- [Abbreviation](dynamic_programming/abbreviation.py) -- [All Construct](dynamic_programming/all_construct.py) -- [Bitmask](dynamic_programming/bitmask.py) -- [Catalan Numbers](dynamic_programming/catalan_numbers.py) -- [Climbing Stairs](dynamic_programming/climbing_stairs.py) -- [Edit Distance](dynamic_programming/edit_distance.py) -- [Factorial](dynamic_programming/factorial.py) -- [Fast Fibonacci](dynamic_programming/fast_fibonacci.py) -- [Fibonacci](dynamic_programming/fibonacci.py) -- [Floyd Warshall](dynamic_programming/floyd_warshall.py) -- [Fractional Knapsack](dynamic_programming/fractional_knapsack.py) -- [Fractional Knapsack 2](dynamic_programming/fractional_knapsack_2.py) -- [Integer Partition](dynamic_programming/integer_partition.py) -- [Iterating Through Submasks](dynamic_programming/iterating_through_submasks.py) -- [Knapsack](dynamic_programming/knapsack.py) -- [Longest Common Subsequence](dynamic_programming/longest_common_subsequence.py) -- [Longest Increasing Subsequence](dynamic_programming/longest_increasing_subsequence.py) -- [Longest Increasing Subsequence O(Nlogn)]() -- [Longest Sub Array](dynamic_programming/longest_sub_array.py) -- [Matrix Chain Order](dynamic_programming/matrix_chain_order.py) -- [Max Non Adjacent Sum](dynamic_programming/max_non_adjacent_sum.py) -- [Max Sub Array](dynamic_programming/max_sub_array.py) -- [Max Sum Contiguous Subsequence](dynamic_programming/max_sum_contiguous_subsequence.py) -- [Minimum Coin Change](dynamic_programming/minimum_coin_change.py) -- [Minimum Cost Path](dynamic_programming/minimum_cost_path.py) -- [Minimum Partition](dynamic_programming/minimum_partition.py) -- [Minimum Steps To One](dynamic_programming/minimum_steps_to_one.py) -- [Optimal Binary Search Tree](dynamic_programming/optimal_binary_search_tree.py) -- [Rod Cutting](dynamic_programming/rod_cutting.py) -- [Subset Generation](dynamic_programming/subset_generation.py) -- [Sum Of Subset](dynamic_programming/sum_of_subset.py) + * [Abbreviation](dynamic_programming/abbreviation.py) + * [All Construct](dynamic_programming/all_construct.py) + * [Bitmask](dynamic_programming/bitmask.py) + * [Catalan Numbers](dynamic_programming/catalan_numbers.py) + * [Climbing Stairs](dynamic_programming/climbing_stairs.py) + * [Edit Distance](dynamic_programming/edit_distance.py) + * [Factorial](dynamic_programming/factorial.py) + * [Fast Fibonacci](dynamic_programming/fast_fibonacci.py) + * [Fibonacci](dynamic_programming/fibonacci.py) + * [Floyd Warshall](dynamic_programming/floyd_warshall.py) + * [Fractional Knapsack](dynamic_programming/fractional_knapsack.py) + * [Fractional Knapsack 2](dynamic_programming/fractional_knapsack_2.py) + * [Integer Partition](dynamic_programming/integer_partition.py) + * [Iterating Through Submasks](dynamic_programming/iterating_through_submasks.py) + * [Knapsack](dynamic_programming/knapsack.py) + * [Longest Common Subsequence](dynamic_programming/longest_common_subsequence.py) + * [Longest Increasing Subsequence](dynamic_programming/longest_increasing_subsequence.py) + * [Longest Increasing Subsequence O(Nlogn)](dynamic_programming/longest_increasing_subsequence_o(nlogn).py) + * [Longest Sub Array](dynamic_programming/longest_sub_array.py) + * [Matrix Chain Order](dynamic_programming/matrix_chain_order.py) + * [Max Non Adjacent Sum](dynamic_programming/max_non_adjacent_sum.py) + * [Max Sub Array](dynamic_programming/max_sub_array.py) + * [Max Sum Contiguous Subsequence](dynamic_programming/max_sum_contiguous_subsequence.py) + * [Minimum Coin Change](dynamic_programming/minimum_coin_change.py) + * [Minimum Cost Path](dynamic_programming/minimum_cost_path.py) + * [Minimum Partition](dynamic_programming/minimum_partition.py) + * [Minimum Steps To One](dynamic_programming/minimum_steps_to_one.py) + * [Optimal Binary Search Tree](dynamic_programming/optimal_binary_search_tree.py) + * [Rod Cutting](dynamic_programming/rod_cutting.py) + * [Subset Generation](dynamic_programming/subset_generation.py) + * [Sum Of Subset](dynamic_programming/sum_of_subset.py) ## Electronics - -- [Carrier Concentration](electronics/carrier_concentration.py) -- [Coulombs Law](electronics/coulombs_law.py) -- [Electric Power](electronics/electric_power.py) -- [Ohms Law](electronics/ohms_law.py) + * [Carrier Concentration](electronics/carrier_concentration.py) + * [Coulombs Law](electronics/coulombs_law.py) + * [Electric Power](electronics/electric_power.py) + * [Ohms Law](electronics/ohms_law.py) ## File Transfer - -- [Receive File](file_transfer/receive_file.py) -- [Send File](file_transfer/send_file.py) -- Tests - - [Test Send File](file_transfer/tests/test_send_file.py) + * [Receive File](file_transfer/receive_file.py) + * [Send File](file_transfer/send_file.py) + * Tests + * [Test Send File](file_transfer/tests/test_send_file.py) ## Financial - -- [Equated Monthly Installments](financial/equated_monthly_installments.py) -- [Interest](financial/interest.py) + * [Equated Monthly Installments](financial/equated_monthly_installments.py) + * [Interest](financial/interest.py) ## Fractals - -- [Julia Sets](fractals/julia_sets.py) -- [Koch Snowflake](fractals/koch_snowflake.py) -- [Mandelbrot](fractals/mandelbrot.py) -- [Sierpinski Triangle](fractals/sierpinski_triangle.py) + * [Julia Sets](fractals/julia_sets.py) + * [Koch Snowflake](fractals/koch_snowflake.py) + * [Mandelbrot](fractals/mandelbrot.py) + * [Sierpinski Triangle](fractals/sierpinski_triangle.py) ## Fuzzy Logic - -- [Fuzzy Operations](fuzzy_logic/fuzzy_operations.py) + * [Fuzzy Operations](fuzzy_logic/fuzzy_operations.py) ## Genetic Algorithm - -- [Basic String](genetic_algorithm/basic_string.py) + * [Basic String](genetic_algorithm/basic_string.py) ## Geodesy - -- [Haversine Distance](geodesy/haversine_distance.py) -- [Lamberts Ellipsoidal Distance](geodesy/lamberts_ellipsoidal_distance.py) + * [Haversine Distance](geodesy/haversine_distance.py) + * [Lamberts Ellipsoidal Distance](geodesy/lamberts_ellipsoidal_distance.py) ## Graphics - -- [Bezier Curve](graphics/bezier_curve.py) -- [Vector3 For 2D Rendering](graphics/vector3_for_2d_rendering.py) + * [Bezier Curve](graphics/bezier_curve.py) + * [Vector3 For 2D Rendering](graphics/vector3_for_2d_rendering.py) ## Graphs - -- [A Star](graphs/a_star.py) -- [Articulation Points](graphs/articulation_points.py) -- [Basic Graphs](graphs/basic_graphs.py) -- [Bellman Ford](graphs/bellman_ford.py) -- [Bfs Shortest Path](graphs/bfs_shortest_path.py) -- [Bfs Zero One Shortest Path](graphs/bfs_zero_one_shortest_path.py) -- [Bidirectional A Star](graphs/bidirectional_a_star.py) -- [Bidirectional Breadth First Search](graphs/bidirectional_breadth_first_search.py) -- [Boruvka](graphs/boruvka.py) -- [Breadth First Search](graphs/breadth_first_search.py) -- [Breadth First Search 2](graphs/breadth_first_search_2.py) -- [Breadth First Search Shortest Path](graphs/breadth_first_search_shortest_path.py) -- [Check Bipartite Graph Bfs](graphs/check_bipartite_graph_bfs.py) -- [Check Bipartite Graph Dfs](graphs/check_bipartite_graph_dfs.py) -- [Check Cycle](graphs/check_cycle.py) -- [Connected Components](graphs/connected_components.py) -- [Depth First Search](graphs/depth_first_search.py) -- [Depth First Search 2](graphs/depth_first_search_2.py) -- [Dijkstra](graphs/dijkstra.py) -- [Dijkstra 2](graphs/dijkstra_2.py) -- [Dijkstra Algorithm](graphs/dijkstra_algorithm.py) -- [Dinic](graphs/dinic.py) -- [Directed And Undirected (Weighted) Graph]() -- [Edmonds Karp Multiple Source And Sink](graphs/edmonds_karp_multiple_source_and_sink.py) -- [Eulerian Path And Circuit For Undirected Graph](graphs/eulerian_path_and_circuit_for_undirected_graph.py) -- [Even Tree](graphs/even_tree.py) -- [Finding Bridges](graphs/finding_bridges.py) -- [Frequent Pattern Graph Miner](graphs/frequent_pattern_graph_miner.py) -- [G Topological Sort](graphs/g_topological_sort.py) -- [Gale Shapley Bigraph](graphs/gale_shapley_bigraph.py) -- [Graph List](graphs/graph_list.py) -- [Graph Matrix](graphs/graph_matrix.py) -- [Graphs Floyd Warshall](graphs/graphs_floyd_warshall.py) -- [Greedy Best First](graphs/greedy_best_first.py) -- [Greedy Min Vertex Cover](graphs/greedy_min_vertex_cover.py) -- [Kahns Algorithm Long](graphs/kahns_algorithm_long.py) -- [Kahns Algorithm Topo](graphs/kahns_algorithm_topo.py) -- [Karger](graphs/karger.py) -- [Markov Chain](graphs/markov_chain.py) -- [Matching Min Vertex Cover](graphs/matching_min_vertex_cover.py) -- [Minimum Path Sum](graphs/minimum_path_sum.py) -- [Minimum Spanning Tree Boruvka](graphs/minimum_spanning_tree_boruvka.py) -- [Minimum Spanning Tree Kruskal](graphs/minimum_spanning_tree_kruskal.py) -- [Minimum Spanning Tree Kruskal2](graphs/minimum_spanning_tree_kruskal2.py) -- [Minimum Spanning Tree Prims](graphs/minimum_spanning_tree_prims.py) -- [Minimum Spanning Tree Prims2](graphs/minimum_spanning_tree_prims2.py) -- [Multi Heuristic Astar](graphs/multi_heuristic_astar.py) -- [Page Rank](graphs/page_rank.py) -- [Prim](graphs/prim.py) -- [Random Graph Generator](graphs/random_graph_generator.py) -- [Scc Kosaraju](graphs/scc_kosaraju.py) -- [Strongly Connected Components](graphs/strongly_connected_components.py) -- [Tarjans Scc](graphs/tarjans_scc.py) -- Tests - - [Test Min Spanning Tree Kruskal](graphs/tests/test_min_spanning_tree_kruskal.py) - - [Test Min Spanning Tree Prim](graphs/tests/test_min_spanning_tree_prim.py) + * [A Star](graphs/a_star.py) + * [Articulation Points](graphs/articulation_points.py) + * [Basic Graphs](graphs/basic_graphs.py) + * [Bellman Ford](graphs/bellman_ford.py) + * [Bfs Shortest Path](graphs/bfs_shortest_path.py) + * [Bfs Zero One Shortest Path](graphs/bfs_zero_one_shortest_path.py) + * [Bidirectional A Star](graphs/bidirectional_a_star.py) + * [Bidirectional Breadth First Search](graphs/bidirectional_breadth_first_search.py) + * [Boruvka](graphs/boruvka.py) + * [Breadth First Search](graphs/breadth_first_search.py) + * [Breadth First Search 2](graphs/breadth_first_search_2.py) + * [Breadth First Search Shortest Path](graphs/breadth_first_search_shortest_path.py) + * [Check Bipartite Graph Bfs](graphs/check_bipartite_graph_bfs.py) + * [Check Bipartite Graph Dfs](graphs/check_bipartite_graph_dfs.py) + * [Check Cycle](graphs/check_cycle.py) + * [Connected Components](graphs/connected_components.py) + * [Depth First Search](graphs/depth_first_search.py) + * [Depth First Search 2](graphs/depth_first_search_2.py) + * [Dijkstra](graphs/dijkstra.py) + * [Dijkstra 2](graphs/dijkstra_2.py) + * [Dijkstra Algorithm](graphs/dijkstra_algorithm.py) + * [Dinic](graphs/dinic.py) + * [Directed And Undirected (Weighted) Graph](graphs/directed_and_undirected_(weighted)_graph.py) + * [Edmonds Karp Multiple Source And Sink](graphs/edmonds_karp_multiple_source_and_sink.py) + * [Eulerian Path And Circuit For Undirected Graph](graphs/eulerian_path_and_circuit_for_undirected_graph.py) + * [Even Tree](graphs/even_tree.py) + * [Finding Bridges](graphs/finding_bridges.py) + * [Frequent Pattern Graph Miner](graphs/frequent_pattern_graph_miner.py) + * [G Topological Sort](graphs/g_topological_sort.py) + * [Gale Shapley Bigraph](graphs/gale_shapley_bigraph.py) + * [Graph List](graphs/graph_list.py) + * [Graph Matrix](graphs/graph_matrix.py) + * [Graphs Floyd Warshall](graphs/graphs_floyd_warshall.py) + * [Greedy Best First](graphs/greedy_best_first.py) + * [Greedy Min Vertex Cover](graphs/greedy_min_vertex_cover.py) + * [Kahns Algorithm Long](graphs/kahns_algorithm_long.py) + * [Kahns Algorithm Topo](graphs/kahns_algorithm_topo.py) + * [Karger](graphs/karger.py) + * [Markov Chain](graphs/markov_chain.py) + * [Matching Min Vertex Cover](graphs/matching_min_vertex_cover.py) + * [Minimum Path Sum](graphs/minimum_path_sum.py) + * [Minimum Spanning Tree Boruvka](graphs/minimum_spanning_tree_boruvka.py) + * [Minimum Spanning Tree Kruskal](graphs/minimum_spanning_tree_kruskal.py) + * [Minimum Spanning Tree Kruskal2](graphs/minimum_spanning_tree_kruskal2.py) + * [Minimum Spanning Tree Prims](graphs/minimum_spanning_tree_prims.py) + * [Minimum Spanning Tree Prims2](graphs/minimum_spanning_tree_prims2.py) + * [Multi Heuristic Astar](graphs/multi_heuristic_astar.py) + * [Page Rank](graphs/page_rank.py) + * [Prim](graphs/prim.py) + * [Random Graph Generator](graphs/random_graph_generator.py) + * [Scc Kosaraju](graphs/scc_kosaraju.py) + * [Strongly Connected Components](graphs/strongly_connected_components.py) + * [Tarjans Scc](graphs/tarjans_scc.py) + * Tests + * [Test Min Spanning Tree Kruskal](graphs/tests/test_min_spanning_tree_kruskal.py) + * [Test Min Spanning Tree Prim](graphs/tests/test_min_spanning_tree_prim.py) ## Greedy Methods - -- [Optimal Merge Pattern](greedy_methods/optimal_merge_pattern.py) + * [Optimal Merge Pattern](greedy_methods/optimal_merge_pattern.py) ## Hashes - -- [Adler32](hashes/adler32.py) -- [Chaos Machine](hashes/chaos_machine.py) -- [Djb2](hashes/djb2.py) -- [Enigma Machine](hashes/enigma_machine.py) -- [Hamming Code](hashes/hamming_code.py) -- [Luhn](hashes/luhn.py) -- [Md5](hashes/md5.py) -- [Sdbm](hashes/sdbm.py) -- [Sha1](hashes/sha1.py) -- [Sha256](hashes/sha256.py) + * [Adler32](hashes/adler32.py) + * [Chaos Machine](hashes/chaos_machine.py) + * [Djb2](hashes/djb2.py) + * [Enigma Machine](hashes/enigma_machine.py) + * [Hamming Code](hashes/hamming_code.py) + * [Luhn](hashes/luhn.py) + * [Md5](hashes/md5.py) + * [Sdbm](hashes/sdbm.py) + * [Sha1](hashes/sha1.py) + * [Sha256](hashes/sha256.py) ## Knapsack - -- [Greedy Knapsack](knapsack/greedy_knapsack.py) -- [Knapsack](knapsack/knapsack.py) -- Tests - - [Test Greedy Knapsack](knapsack/tests/test_greedy_knapsack.py) - - [Test Knapsack](knapsack/tests/test_knapsack.py) + * [Greedy Knapsack](knapsack/greedy_knapsack.py) + * [Knapsack](knapsack/knapsack.py) + * Tests + * [Test Greedy Knapsack](knapsack/tests/test_greedy_knapsack.py) + * [Test Knapsack](knapsack/tests/test_knapsack.py) ## Linear Algebra - -- Src - - [Conjugate Gradient](linear_algebra/src/conjugate_gradient.py) - - [Lib](linear_algebra/src/lib.py) - - [Polynom For Points](linear_algebra/src/polynom_for_points.py) - - [Power Iteration](linear_algebra/src/power_iteration.py) - - [Rayleigh Quotient](linear_algebra/src/rayleigh_quotient.py) - - [Schur Complement](linear_algebra/src/schur_complement.py) - - [Test Linear Algebra](linear_algebra/src/test_linear_algebra.py) - - [Transformations 2D](linear_algebra/src/transformations_2d.py) + * Src + * [Conjugate Gradient](linear_algebra/src/conjugate_gradient.py) + * [Lib](linear_algebra/src/lib.py) + * [Polynom For Points](linear_algebra/src/polynom_for_points.py) + * [Power Iteration](linear_algebra/src/power_iteration.py) + * [Rayleigh Quotient](linear_algebra/src/rayleigh_quotient.py) + * [Schur Complement](linear_algebra/src/schur_complement.py) + * [Test Linear Algebra](linear_algebra/src/test_linear_algebra.py) + * [Transformations 2D](linear_algebra/src/transformations_2d.py) ## Machine Learning - -- [Astar](machine_learning/astar.py) -- [Data Transformations](machine_learning/data_transformations.py) -- [Decision Tree](machine_learning/decision_tree.py) -- Forecasting - - [Run](machine_learning/forecasting/run.py) -- [Gaussian Naive Bayes](machine_learning/gaussian_naive_bayes.py) -- [Gradient Boosting Regressor](machine_learning/gradient_boosting_regressor.py) -- [Gradient Descent](machine_learning/gradient_descent.py) -- [K Means Clust](machine_learning/k_means_clust.py) -- [K Nearest Neighbours](machine_learning/k_nearest_neighbours.py) -- [Knn Sklearn](machine_learning/knn_sklearn.py) -- [Linear Discriminant Analysis](machine_learning/linear_discriminant_analysis.py) -- [Linear Regression](machine_learning/linear_regression.py) -- Local Weighted Learning - - [Local Weighted Learning](machine_learning/local_weighted_learning/local_weighted_learning.py) -- [Logistic Regression](machine_learning/logistic_regression.py) -- Lstm - - [Lstm Prediction](machine_learning/lstm/lstm_prediction.py) -- [Multilayer Perceptron Classifier](machine_learning/multilayer_perceptron_classifier.py) -- [Polymonial Regression](machine_learning/polymonial_regression.py) -- [Random Forest Classifier](machine_learning/random_forest_classifier.py) -- [Random Forest Regressor](machine_learning/random_forest_regressor.py) -- [Scoring Functions](machine_learning/scoring_functions.py) -- [Self Organizing Map](machine_learning/self_organizing_map.py) -- [Sequential Minimum Optimization](machine_learning/sequential_minimum_optimization.py) -- [Similarity Search](machine_learning/similarity_search.py) -- [Support Vector Machines](machine_learning/support_vector_machines.py) -- [Word Frequency Functions](machine_learning/word_frequency_functions.py) + * [Astar](machine_learning/astar.py) + * [Data Transformations](machine_learning/data_transformations.py) + * [Decision Tree](machine_learning/decision_tree.py) + * Forecasting + * [Run](machine_learning/forecasting/run.py) + * [Gaussian Naive Bayes](machine_learning/gaussian_naive_bayes.py) + * [Gradient Boosting Regressor](machine_learning/gradient_boosting_regressor.py) + * [Gradient Descent](machine_learning/gradient_descent.py) + * [K Means Clust](machine_learning/k_means_clust.py) + * [K Nearest Neighbours](machine_learning/k_nearest_neighbours.py) + * [Knn Sklearn](machine_learning/knn_sklearn.py) + * [Linear Discriminant Analysis](machine_learning/linear_discriminant_analysis.py) + * [Linear Regression](machine_learning/linear_regression.py) + * Local Weighted Learning + * [Local Weighted Learning](machine_learning/local_weighted_learning/local_weighted_learning.py) + * [Logistic Regression](machine_learning/logistic_regression.py) + * Lstm + * [Lstm Prediction](machine_learning/lstm/lstm_prediction.py) + * [Multilayer Perceptron Classifier](machine_learning/multilayer_perceptron_classifier.py) + * [Polymonial Regression](machine_learning/polymonial_regression.py) + * [Random Forest Classifier](machine_learning/random_forest_classifier.py) + * [Random Forest Regressor](machine_learning/random_forest_regressor.py) + * [Scoring Functions](machine_learning/scoring_functions.py) + * [Self Organizing Map](machine_learning/self_organizing_map.py) + * [Sequential Minimum Optimization](machine_learning/sequential_minimum_optimization.py) + * [Similarity Search](machine_learning/similarity_search.py) + * [Support Vector Machines](machine_learning/support_vector_machines.py) + * [Word Frequency Functions](machine_learning/word_frequency_functions.py) ## Maths - -- [3N Plus 1](maths/3n_plus_1.py) -- [Abs](maths/abs.py) -- [Abs Max](maths/abs_max.py) -- [Abs Min](maths/abs_min.py) -- [Add](maths/add.py) -- [Aliquot Sum](maths/aliquot_sum.py) -- [Allocation Number](maths/allocation_number.py) -- [Area](maths/area.py) -- [Area Under Curve](maths/area_under_curve.py) -- [Armstrong Numbers](maths/armstrong_numbers.py) -- [Average Absolute Deviation](maths/average_absolute_deviation.py) -- [Average Mean](maths/average_mean.py) -- [Average Median](maths/average_median.py) -- [Average Mode](maths/average_mode.py) -- [Bailey Borwein Plouffe](maths/bailey_borwein_plouffe.py) -- [Basic Maths](maths/basic_maths.py) -- [Binary Exp Mod](maths/binary_exp_mod.py) -- [Binary Exponentiation](maths/binary_exponentiation.py) -- [Binary Exponentiation 2](maths/binary_exponentiation_2.py) -- [Binary Exponentiation 3](maths/binary_exponentiation_3.py) -- [Binomial Coefficient](maths/binomial_coefficient.py) -- [Binomial Distribution](maths/binomial_distribution.py) -- [Bisection](maths/bisection.py) -- [Carmichael Number](maths/carmichael_number.py) -- [Catalan Number](maths/catalan_number.py) -- [Ceil](maths/ceil.py) -- [Check Polygon](maths/check_polygon.py) -- [Chudnovsky Algorithm](maths/chudnovsky_algorithm.py) -- [Collatz Sequence](maths/collatz_sequence.py) -- [Combinations](maths/combinations.py) -- [Decimal Isolate](maths/decimal_isolate.py) -- [Double Factorial Iterative](maths/double_factorial_iterative.py) -- [Double Factorial Recursive](maths/double_factorial_recursive.py) -- [Entropy](maths/entropy.py) -- [Euclidean Distance](maths/euclidean_distance.py) -- [Euclidean Gcd](maths/euclidean_gcd.py) -- [Euler Method](maths/euler_method.py) -- [Euler Modified](maths/euler_modified.py) -- [Eulers Totient](maths/eulers_totient.py) -- [Extended Euclidean Algorithm](maths/extended_euclidean_algorithm.py) -- [Factorial Iterative](maths/factorial_iterative.py) -- [Factorial Recursive](maths/factorial_recursive.py) -- [Factors](maths/factors.py) -- [Fermat Little Theorem](maths/fermat_little_theorem.py) -- [Fibonacci](maths/fibonacci.py) -- [Find Max](maths/find_max.py) -- [Find Max Recursion](maths/find_max_recursion.py) -- [Find Min](maths/find_min.py) -- [Find Min Recursion](maths/find_min_recursion.py) -- [Floor](maths/floor.py) -- [Gamma](maths/gamma.py) -- [Gamma Recursive](maths/gamma_recursive.py) -- [Gaussian](maths/gaussian.py) -- [Greatest Common Divisor](maths/greatest_common_divisor.py) -- [Greedy Coin Change](maths/greedy_coin_change.py) -- [Hamming Numbers](maths/hamming_numbers.py) -- [Hardy Ramanujanalgo](maths/hardy_ramanujanalgo.py) -- [Integration By Simpson Approx](maths/integration_by_simpson_approx.py) -- [Is Ip V4 Address Valid](maths/is_ip_v4_address_valid.py) -- [Is Square Free](maths/is_square_free.py) -- [Jaccard Similarity](maths/jaccard_similarity.py) -- [Kadanes](maths/kadanes.py) -- [Karatsuba](maths/karatsuba.py) -- [Krishnamurthy Number](maths/krishnamurthy_number.py) -- [Kth Lexicographic Permutation](maths/kth_lexicographic_permutation.py) -- [Largest Of Very Large Numbers](maths/largest_of_very_large_numbers.py) -- [Largest Subarray Sum](maths/largest_subarray_sum.py) -- [Least Common Multiple](maths/least_common_multiple.py) -- [Line Length](maths/line_length.py) -- [Lucas Lehmer Primality Test](maths/lucas_lehmer_primality_test.py) -- [Lucas Series](maths/lucas_series.py) -- [Matrix Exponentiation](maths/matrix_exponentiation.py) -- [Max Sum Sliding Window](maths/max_sum_sliding_window.py) -- [Median Of Two Arrays](maths/median_of_two_arrays.py) -- [Miller Rabin](maths/miller_rabin.py) -- [Mobius Function](maths/mobius_function.py) -- [Modular Exponential](maths/modular_exponential.py) -- [Monte Carlo](maths/monte_carlo.py) -- [Monte Carlo Dice](maths/monte_carlo_dice.py) -- [Nevilles Method](maths/nevilles_method.py) -- [Newton Raphson](maths/newton_raphson.py) -- [Number Of Digits](maths/number_of_digits.py) -- [Numerical Integration](maths/numerical_integration.py) -- [Perfect Cube](maths/perfect_cube.py) -- [Perfect Number](maths/perfect_number.py) -- [Perfect Square](maths/perfect_square.py) -- [Persistence](maths/persistence.py) -- [Pi Monte Carlo Estimation](maths/pi_monte_carlo_estimation.py) -- [Points Are Collinear 3D](maths/points_are_collinear_3d.py) -- [Pollard Rho](maths/pollard_rho.py) -- [Polynomial Evaluation](maths/polynomial_evaluation.py) -- [Power Using Recursion](maths/power_using_recursion.py) -- [Prime Check](maths/prime_check.py) -- [Prime Factors](maths/prime_factors.py) -- [Prime Numbers](maths/prime_numbers.py) -- [Prime Sieve Eratosthenes](maths/prime_sieve_eratosthenes.py) -- [Primelib](maths/primelib.py) -- [Proth Number](maths/proth_number.py) -- [Pythagoras](maths/pythagoras.py) -- [Qr Decomposition](maths/qr_decomposition.py) -- [Quadratic Equations Complex Numbers](maths/quadratic_equations_complex_numbers.py) -- [Radians](maths/radians.py) -- [Radix2 Fft](maths/radix2_fft.py) -- [Relu](maths/relu.py) -- [Runge Kutta](maths/runge_kutta.py) -- [Segmented Sieve](maths/segmented_sieve.py) -- Series - - [Arithmetic](maths/series/arithmetic.py) - - [Geometric](maths/series/geometric.py) - - [Geometric Series](maths/series/geometric_series.py) - - [Harmonic](maths/series/harmonic.py) - - [Harmonic Series](maths/series/harmonic_series.py) - - [Hexagonal Numbers](maths/series/hexagonal_numbers.py) - - [P Series](maths/series/p_series.py) -- [Sieve Of Eratosthenes](maths/sieve_of_eratosthenes.py) -- [Sigmoid](maths/sigmoid.py) -- [Simpson Rule](maths/simpson_rule.py) -- [Sin](maths/sin.py) -- [Sock Merchant](maths/sock_merchant.py) -- [Softmax](maths/softmax.py) -- [Square Root](maths/square_root.py) -- [Sum Of Arithmetic Series](maths/sum_of_arithmetic_series.py) -- [Sum Of Digits](maths/sum_of_digits.py) -- [Sum Of Geometric Progression](maths/sum_of_geometric_progression.py) -- [Sylvester Sequence](maths/sylvester_sequence.py) -- [Test Prime Check](maths/test_prime_check.py) -- [Trapezoidal Rule](maths/trapezoidal_rule.py) -- [Triplet Sum](maths/triplet_sum.py) -- [Two Pointer](maths/two_pointer.py) -- [Two Sum](maths/two_sum.py) -- [Ugly Numbers](maths/ugly_numbers.py) -- [Volume](maths/volume.py) -- [Weird Number](maths/weird_number.py) -- [Zellers Congruence](maths/zellers_congruence.py) + * [3N Plus 1](maths/3n_plus_1.py) + * [Abs](maths/abs.py) + * [Abs Max](maths/abs_max.py) + * [Abs Min](maths/abs_min.py) + * [Add](maths/add.py) + * [Aliquot Sum](maths/aliquot_sum.py) + * [Allocation Number](maths/allocation_number.py) + * [Area](maths/area.py) + * [Area Under Curve](maths/area_under_curve.py) + * [Armstrong Numbers](maths/armstrong_numbers.py) + * [Average Absolute Deviation](maths/average_absolute_deviation.py) + * [Average Mean](maths/average_mean.py) + * [Average Median](maths/average_median.py) + * [Average Mode](maths/average_mode.py) + * [Bailey Borwein Plouffe](maths/bailey_borwein_plouffe.py) + * [Basic Maths](maths/basic_maths.py) + * [Binary Exp Mod](maths/binary_exp_mod.py) + * [Binary Exponentiation](maths/binary_exponentiation.py) + * [Binary Exponentiation 2](maths/binary_exponentiation_2.py) + * [Binary Exponentiation 3](maths/binary_exponentiation_3.py) + * [Binomial Coefficient](maths/binomial_coefficient.py) + * [Binomial Distribution](maths/binomial_distribution.py) + * [Bisection](maths/bisection.py) + * [Carmichael Number](maths/carmichael_number.py) + * [Catalan Number](maths/catalan_number.py) + * [Ceil](maths/ceil.py) + * [Check Polygon](maths/check_polygon.py) + * [Chudnovsky Algorithm](maths/chudnovsky_algorithm.py) + * [Collatz Sequence](maths/collatz_sequence.py) + * [Combinations](maths/combinations.py) + * [Decimal Isolate](maths/decimal_isolate.py) + * [Double Factorial Iterative](maths/double_factorial_iterative.py) + * [Double Factorial Recursive](maths/double_factorial_recursive.py) + * [Entropy](maths/entropy.py) + * [Euclidean Distance](maths/euclidean_distance.py) + * [Euclidean Gcd](maths/euclidean_gcd.py) + * [Euler Method](maths/euler_method.py) + * [Euler Modified](maths/euler_modified.py) + * [Eulers Totient](maths/eulers_totient.py) + * [Extended Euclidean Algorithm](maths/extended_euclidean_algorithm.py) + * [Factorial Iterative](maths/factorial_iterative.py) + * [Factorial Recursive](maths/factorial_recursive.py) + * [Factors](maths/factors.py) + * [Fermat Little Theorem](maths/fermat_little_theorem.py) + * [Fibonacci](maths/fibonacci.py) + * [Find Max](maths/find_max.py) + * [Find Max Recursion](maths/find_max_recursion.py) + * [Find Min](maths/find_min.py) + * [Find Min Recursion](maths/find_min_recursion.py) + * [Floor](maths/floor.py) + * [Gamma](maths/gamma.py) + * [Gamma Recursive](maths/gamma_recursive.py) + * [Gaussian](maths/gaussian.py) + * [Greatest Common Divisor](maths/greatest_common_divisor.py) + * [Greedy Coin Change](maths/greedy_coin_change.py) + * [Hamming Numbers](maths/hamming_numbers.py) + * [Hardy Ramanujanalgo](maths/hardy_ramanujanalgo.py) + * [Integration By Simpson Approx](maths/integration_by_simpson_approx.py) + * [Is Ip V4 Address Valid](maths/is_ip_v4_address_valid.py) + * [Is Square Free](maths/is_square_free.py) + * [Jaccard Similarity](maths/jaccard_similarity.py) + * [Kadanes](maths/kadanes.py) + * [Karatsuba](maths/karatsuba.py) + * [Krishnamurthy Number](maths/krishnamurthy_number.py) + * [Kth Lexicographic Permutation](maths/kth_lexicographic_permutation.py) + * [Largest Of Very Large Numbers](maths/largest_of_very_large_numbers.py) + * [Largest Subarray Sum](maths/largest_subarray_sum.py) + * [Least Common Multiple](maths/least_common_multiple.py) + * [Line Length](maths/line_length.py) + * [Lucas Lehmer Primality Test](maths/lucas_lehmer_primality_test.py) + * [Lucas Series](maths/lucas_series.py) + * [Matrix Exponentiation](maths/matrix_exponentiation.py) + * [Max Sum Sliding Window](maths/max_sum_sliding_window.py) + * [Median Of Two Arrays](maths/median_of_two_arrays.py) + * [Miller Rabin](maths/miller_rabin.py) + * [Mobius Function](maths/mobius_function.py) + * [Modular Exponential](maths/modular_exponential.py) + * [Monte Carlo](maths/monte_carlo.py) + * [Monte Carlo Dice](maths/monte_carlo_dice.py) + * [Nevilles Method](maths/nevilles_method.py) + * [Newton Raphson](maths/newton_raphson.py) + * [Number Of Digits](maths/number_of_digits.py) + * [Numerical Integration](maths/numerical_integration.py) + * [Perfect Cube](maths/perfect_cube.py) + * [Perfect Number](maths/perfect_number.py) + * [Perfect Square](maths/perfect_square.py) + * [Persistence](maths/persistence.py) + * [Pi Monte Carlo Estimation](maths/pi_monte_carlo_estimation.py) + * [Points Are Collinear 3D](maths/points_are_collinear_3d.py) + * [Pollard Rho](maths/pollard_rho.py) + * [Polynomial Evaluation](maths/polynomial_evaluation.py) + * [Power Using Recursion](maths/power_using_recursion.py) + * [Prime Check](maths/prime_check.py) + * [Prime Factors](maths/prime_factors.py) + * [Prime Numbers](maths/prime_numbers.py) + * [Prime Sieve Eratosthenes](maths/prime_sieve_eratosthenes.py) + * [Primelib](maths/primelib.py) + * [Proth Number](maths/proth_number.py) + * [Pythagoras](maths/pythagoras.py) + * [Qr Decomposition](maths/qr_decomposition.py) + * [Quadratic Equations Complex Numbers](maths/quadratic_equations_complex_numbers.py) + * [Radians](maths/radians.py) + * [Radix2 Fft](maths/radix2_fft.py) + * [Relu](maths/relu.py) + * [Runge Kutta](maths/runge_kutta.py) + * [Segmented Sieve](maths/segmented_sieve.py) + * Series + * [Arithmetic](maths/series/arithmetic.py) + * [Geometric](maths/series/geometric.py) + * [Geometric Series](maths/series/geometric_series.py) + * [Harmonic](maths/series/harmonic.py) + * [Harmonic Series](maths/series/harmonic_series.py) + * [Hexagonal Numbers](maths/series/hexagonal_numbers.py) + * [P Series](maths/series/p_series.py) + * [Sieve Of Eratosthenes](maths/sieve_of_eratosthenes.py) + * [Sigmoid](maths/sigmoid.py) + * [Simpson Rule](maths/simpson_rule.py) + * [Sin](maths/sin.py) + * [Sock Merchant](maths/sock_merchant.py) + * [Softmax](maths/softmax.py) + * [Square Root](maths/square_root.py) + * [Sum Of Arithmetic Series](maths/sum_of_arithmetic_series.py) + * [Sum Of Digits](maths/sum_of_digits.py) + * [Sum Of Geometric Progression](maths/sum_of_geometric_progression.py) + * [Sylvester Sequence](maths/sylvester_sequence.py) + * [Test Prime Check](maths/test_prime_check.py) + * [Trapezoidal Rule](maths/trapezoidal_rule.py) + * [Triplet Sum](maths/triplet_sum.py) + * [Two Pointer](maths/two_pointer.py) + * [Two Sum](maths/two_sum.py) + * [Ugly Numbers](maths/ugly_numbers.py) + * [Volume](maths/volume.py) + * [Weird Number](maths/weird_number.py) + * [Zellers Congruence](maths/zellers_congruence.py) ## Matrix - -- [Binary Search Matrix](matrix/binary_search_matrix.py) -- [Count Islands In Matrix](matrix/count_islands_in_matrix.py) -- [Inverse Of Matrix](matrix/inverse_of_matrix.py) -- [Matrix Class](matrix/matrix_class.py) -- [Matrix Operation](matrix/matrix_operation.py) -- [Nth Fibonacci Using Matrix Exponentiation](matrix/nth_fibonacci_using_matrix_exponentiation.py) -- [Rotate Matrix](matrix/rotate_matrix.py) -- [Searching In Sorted Matrix](matrix/searching_in_sorted_matrix.py) -- [Sherman Morrison](matrix/sherman_morrison.py) -- [Spiral Print](matrix/spiral_print.py) -- Tests - - [Test Matrix Operation](matrix/tests/test_matrix_operation.py) + * [Binary Search Matrix](matrix/binary_search_matrix.py) + * [Count Islands In Matrix](matrix/count_islands_in_matrix.py) + * [Inverse Of Matrix](matrix/inverse_of_matrix.py) + * [Matrix Class](matrix/matrix_class.py) + * [Matrix Operation](matrix/matrix_operation.py) + * [Nth Fibonacci Using Matrix Exponentiation](matrix/nth_fibonacci_using_matrix_exponentiation.py) + * [Rotate Matrix](matrix/rotate_matrix.py) + * [Searching In Sorted Matrix](matrix/searching_in_sorted_matrix.py) + * [Sherman Morrison](matrix/sherman_morrison.py) + * [Spiral Print](matrix/spiral_print.py) + * Tests + * [Test Matrix Operation](matrix/tests/test_matrix_operation.py) ## Networking Flow - -- [Ford Fulkerson](networking_flow/ford_fulkerson.py) -- [Minimum Cut](networking_flow/minimum_cut.py) + * [Ford Fulkerson](networking_flow/ford_fulkerson.py) + * [Minimum Cut](networking_flow/minimum_cut.py) ## Neural Network - -- [2 Hidden Layers Neural Network](neural_network/2_hidden_layers_neural_network.py) -- [Back Propagation Neural Network](neural_network/back_propagation_neural_network.py) -- [Convolution Neural Network](neural_network/convolution_neural_network.py) -- [Perceptron](neural_network/perceptron.py) + * [2 Hidden Layers Neural Network](neural_network/2_hidden_layers_neural_network.py) + * [Back Propagation Neural Network](neural_network/back_propagation_neural_network.py) + * [Convolution Neural Network](neural_network/convolution_neural_network.py) + * [Perceptron](neural_network/perceptron.py) ## Other - -- [Activity Selection](other/activity_selection.py) -- [Alternative List Arrange](other/alternative_list_arrange.py) -- [Check Strong Password](other/check_strong_password.py) -- [Davisb Putnamb Logemannb Loveland](other/davisb_putnamb_logemannb_loveland.py) -- [Dijkstra Bankers Algorithm](other/dijkstra_bankers_algorithm.py) -- [Doomsday](other/doomsday.py) -- [Fischer Yates Shuffle](other/fischer_yates_shuffle.py) -- [Gauss Easter](other/gauss_easter.py) -- [Graham Scan](other/graham_scan.py) -- [Greedy](other/greedy.py) -- [Least Recently Used](other/least_recently_used.py) -- [Lfu Cache](other/lfu_cache.py) -- [Linear Congruential Generator](other/linear_congruential_generator.py) -- [Lru Cache](other/lru_cache.py) -- [Magicdiamondpattern](other/magicdiamondpattern.py) -- [Maximum Subarray](other/maximum_subarray.py) -- [Nested Brackets](other/nested_brackets.py) -- [Password Generator](other/password_generator.py) -- [Scoring Algorithm](other/scoring_algorithm.py) -- [Sdes](other/sdes.py) -- [Tower Of Hanoi](other/tower_of_hanoi.py) + * [Activity Selection](other/activity_selection.py) + * [Alternative List Arrange](other/alternative_list_arrange.py) + * [Check Strong Password](other/check_strong_password.py) + * [Davisb Putnamb Logemannb Loveland](other/davisb_putnamb_logemannb_loveland.py) + * [Dijkstra Bankers Algorithm](other/dijkstra_bankers_algorithm.py) + * [Doomsday](other/doomsday.py) + * [Fischer Yates Shuffle](other/fischer_yates_shuffle.py) + * [Gauss Easter](other/gauss_easter.py) + * [Graham Scan](other/graham_scan.py) + * [Greedy](other/greedy.py) + * [Least Recently Used](other/least_recently_used.py) + * [Lfu Cache](other/lfu_cache.py) + * [Linear Congruential Generator](other/linear_congruential_generator.py) + * [Lru Cache](other/lru_cache.py) + * [Magicdiamondpattern](other/magicdiamondpattern.py) + * [Maximum Subarray](other/maximum_subarray.py) + * [Nested Brackets](other/nested_brackets.py) + * [Password Generator](other/password_generator.py) + * [Scoring Algorithm](other/scoring_algorithm.py) + * [Sdes](other/sdes.py) + * [Tower Of Hanoi](other/tower_of_hanoi.py) ## Physics - -- [Horizontal Projectile Motion](physics/horizontal_projectile_motion.py) -- [Lorentz Transformation Four Vector](physics/lorentz_transformation_four_vector.py) -- [N Body Simulation](physics/n_body_simulation.py) -- [Newtons Law Of Gravitation](physics/newtons_law_of_gravitation.py) -- [Newtons Second Law Of Motion](physics/newtons_second_law_of_motion.py) + * [Horizontal Projectile Motion](physics/horizontal_projectile_motion.py) + * [Lorentz Transformation Four Vector](physics/lorentz_transformation_four_vector.py) + * [N Body Simulation](physics/n_body_simulation.py) + * [Newtons Law Of Gravitation](physics/newtons_law_of_gravitation.py) + * [Newtons Second Law Of Motion](physics/newtons_second_law_of_motion.py) ## Project Euler - -- Problem 001 - - [Sol1](project_euler/problem_001/sol1.py) - - [Sol2](project_euler/problem_001/sol2.py) - - [Sol3](project_euler/problem_001/sol3.py) - - [Sol4](project_euler/problem_001/sol4.py) - - [Sol5](project_euler/problem_001/sol5.py) - - [Sol6](project_euler/problem_001/sol6.py) - - [Sol7](project_euler/problem_001/sol7.py) -- Problem 002 - - [Sol1](project_euler/problem_002/sol1.py) - - [Sol2](project_euler/problem_002/sol2.py) - - [Sol3](project_euler/problem_002/sol3.py) - - [Sol4](project_euler/problem_002/sol4.py) - - [Sol5](project_euler/problem_002/sol5.py) -- Problem 003 - - [Sol1](project_euler/problem_003/sol1.py) - - [Sol2](project_euler/problem_003/sol2.py) - - [Sol3](project_euler/problem_003/sol3.py) -- Problem 004 - - [Sol1](project_euler/problem_004/sol1.py) - - [Sol2](project_euler/problem_004/sol2.py) -- Problem 005 - - [Sol1](project_euler/problem_005/sol1.py) - - [Sol2](project_euler/problem_005/sol2.py) -- Problem 006 - - [Sol1](project_euler/problem_006/sol1.py) - - [Sol2](project_euler/problem_006/sol2.py) - - [Sol3](project_euler/problem_006/sol3.py) - - [Sol4](project_euler/problem_006/sol4.py) -- Problem 007 - - [Sol1](project_euler/problem_007/sol1.py) - - [Sol2](project_euler/problem_007/sol2.py) - - [Sol3](project_euler/problem_007/sol3.py) -- Problem 008 - - [Sol1](project_euler/problem_008/sol1.py) - - [Sol2](project_euler/problem_008/sol2.py) - - [Sol3](project_euler/problem_008/sol3.py) -- Problem 009 - - [Sol1](project_euler/problem_009/sol1.py) - - [Sol2](project_euler/problem_009/sol2.py) - - [Sol3](project_euler/problem_009/sol3.py) -- Problem 010 - - [Sol1](project_euler/problem_010/sol1.py) - - [Sol2](project_euler/problem_010/sol2.py) - - [Sol3](project_euler/problem_010/sol3.py) -- Problem 011 - - [Sol1](project_euler/problem_011/sol1.py) - - [Sol2](project_euler/problem_011/sol2.py) -- Problem 012 - - [Sol1](project_euler/problem_012/sol1.py) - - [Sol2](project_euler/problem_012/sol2.py) -- Problem 013 - - [Sol1](project_euler/problem_013/sol1.py) -- Problem 014 - - [Sol1](project_euler/problem_014/sol1.py) - - [Sol2](project_euler/problem_014/sol2.py) -- Problem 015 - - [Sol1](project_euler/problem_015/sol1.py) -- Problem 016 - - [Sol1](project_euler/problem_016/sol1.py) - - [Sol2](project_euler/problem_016/sol2.py) -- Problem 017 - - [Sol1](project_euler/problem_017/sol1.py) -- Problem 018 - - [Solution](project_euler/problem_018/solution.py) -- Problem 019 - - [Sol1](project_euler/problem_019/sol1.py) -- Problem 020 - - [Sol1](project_euler/problem_020/sol1.py) - - [Sol2](project_euler/problem_020/sol2.py) - - [Sol3](project_euler/problem_020/sol3.py) - - [Sol4](project_euler/problem_020/sol4.py) -- Problem 021 - - [Sol1](project_euler/problem_021/sol1.py) -- Problem 022 - - [Sol1](project_euler/problem_022/sol1.py) - - [Sol2](project_euler/problem_022/sol2.py) -- Problem 023 - - [Sol1](project_euler/problem_023/sol1.py) -- Problem 024 - - [Sol1](project_euler/problem_024/sol1.py) -- Problem 025 - - [Sol1](project_euler/problem_025/sol1.py) - - [Sol2](project_euler/problem_025/sol2.py) - - [Sol3](project_euler/problem_025/sol3.py) -- Problem 026 - - [Sol1](project_euler/problem_026/sol1.py) -- Problem 027 - - [Sol1](project_euler/problem_027/sol1.py) -- Problem 028 - - [Sol1](project_euler/problem_028/sol1.py) -- Problem 029 - - [Sol1](project_euler/problem_029/sol1.py) -- Problem 030 - - [Sol1](project_euler/problem_030/sol1.py) -- Problem 031 - - [Sol1](project_euler/problem_031/sol1.py) - - [Sol2](project_euler/problem_031/sol2.py) -- Problem 032 - - [Sol32](project_euler/problem_032/sol32.py) -- Problem 033 - - [Sol1](project_euler/problem_033/sol1.py) -- Problem 034 - - [Sol1](project_euler/problem_034/sol1.py) -- Problem 035 - - [Sol1](project_euler/problem_035/sol1.py) -- Problem 036 - - [Sol1](project_euler/problem_036/sol1.py) -- Problem 037 - - [Sol1](project_euler/problem_037/sol1.py) -- Problem 038 - - [Sol1](project_euler/problem_038/sol1.py) -- Problem 039 - - [Sol1](project_euler/problem_039/sol1.py) -- Problem 040 - - [Sol1](project_euler/problem_040/sol1.py) -- Problem 041 - - [Sol1](project_euler/problem_041/sol1.py) -- Problem 042 - - [Solution42](project_euler/problem_042/solution42.py) -- Problem 043 - - [Sol1](project_euler/problem_043/sol1.py) -- Problem 044 - - [Sol1](project_euler/problem_044/sol1.py) -- Problem 045 - - [Sol1](project_euler/problem_045/sol1.py) -- Problem 046 - - [Sol1](project_euler/problem_046/sol1.py) -- Problem 047 - - [Sol1](project_euler/problem_047/sol1.py) -- Problem 048 - - [Sol1](project_euler/problem_048/sol1.py) -- Problem 049 - - [Sol1](project_euler/problem_049/sol1.py) -- Problem 050 - - [Sol1](project_euler/problem_050/sol1.py) -- Problem 051 - - [Sol1](project_euler/problem_051/sol1.py) -- Problem 052 - - [Sol1](project_euler/problem_052/sol1.py) -- Problem 053 - - [Sol1](project_euler/problem_053/sol1.py) -- Problem 054 - - [Sol1](project_euler/problem_054/sol1.py) - - [Test Poker Hand](project_euler/problem_054/test_poker_hand.py) -- Problem 055 - - [Sol1](project_euler/problem_055/sol1.py) -- Problem 056 - - [Sol1](project_euler/problem_056/sol1.py) -- Problem 057 - - [Sol1](project_euler/problem_057/sol1.py) -- Problem 058 - - [Sol1](project_euler/problem_058/sol1.py) -- Problem 059 - - [Sol1](project_euler/problem_059/sol1.py) -- Problem 062 - - [Sol1](project_euler/problem_062/sol1.py) -- Problem 063 - - [Sol1](project_euler/problem_063/sol1.py) -- Problem 064 - - [Sol1](project_euler/problem_064/sol1.py) -- Problem 065 - - [Sol1](project_euler/problem_065/sol1.py) -- Problem 067 - - [Sol1](project_euler/problem_067/sol1.py) - - [Sol2](project_euler/problem_067/sol2.py) -- Problem 068 - - [Sol1](project_euler/problem_068/sol1.py) -- Problem 069 - - [Sol1](project_euler/problem_069/sol1.py) -- Problem 070 - - [Sol1](project_euler/problem_070/sol1.py) -- Problem 071 - - [Sol1](project_euler/problem_071/sol1.py) -- Problem 072 - - [Sol1](project_euler/problem_072/sol1.py) - - [Sol2](project_euler/problem_072/sol2.py) -- Problem 074 - - [Sol1](project_euler/problem_074/sol1.py) - - [Sol2](project_euler/problem_074/sol2.py) -- Problem 075 - - [Sol1](project_euler/problem_075/sol1.py) -- Problem 076 - - [Sol1](project_euler/problem_076/sol1.py) -- Problem 077 - - [Sol1](project_euler/problem_077/sol1.py) -- Problem 078 - - [Sol1](project_euler/problem_078/sol1.py) -- Problem 080 - - [Sol1](project_euler/problem_080/sol1.py) -- Problem 081 - - [Sol1](project_euler/problem_081/sol1.py) -- Problem 085 - - [Sol1](project_euler/problem_085/sol1.py) -- Problem 086 - - [Sol1](project_euler/problem_086/sol1.py) -- Problem 087 - - [Sol1](project_euler/problem_087/sol1.py) -- Problem 089 - - [Sol1](project_euler/problem_089/sol1.py) -- Problem 091 - - [Sol1](project_euler/problem_091/sol1.py) -- Problem 092 - - [Sol1](project_euler/problem_092/sol1.py) -- Problem 097 - - [Sol1](project_euler/problem_097/sol1.py) -- Problem 099 - - [Sol1](project_euler/problem_099/sol1.py) -- Problem 101 - - [Sol1](project_euler/problem_101/sol1.py) -- Problem 102 - - [Sol1](project_euler/problem_102/sol1.py) -- Problem 107 - - [Sol1](project_euler/problem_107/sol1.py) -- Problem 109 - - [Sol1](project_euler/problem_109/sol1.py) -- Problem 112 - - [Sol1](project_euler/problem_112/sol1.py) -- Problem 113 - - [Sol1](project_euler/problem_113/sol1.py) -- Problem 114 - - [Sol1](project_euler/problem_114/sol1.py) -- Problem 115 - - [Sol1](project_euler/problem_115/sol1.py) -- Problem 116 - - [Sol1](project_euler/problem_116/sol1.py) -- Problem 119 - - [Sol1](project_euler/problem_119/sol1.py) -- Problem 120 - - [Sol1](project_euler/problem_120/sol1.py) -- Problem 121 - - [Sol1](project_euler/problem_121/sol1.py) -- Problem 123 - - [Sol1](project_euler/problem_123/sol1.py) -- Problem 125 - - [Sol1](project_euler/problem_125/sol1.py) -- Problem 129 - - [Sol1](project_euler/problem_129/sol1.py) -- Problem 135 - - [Sol1](project_euler/problem_135/sol1.py) -- Problem 144 - - [Sol1](project_euler/problem_144/sol1.py) -- Problem 145 - - [Sol1](project_euler/problem_145/sol1.py) -- Problem 173 - - [Sol1](project_euler/problem_173/sol1.py) -- Problem 174 - - [Sol1](project_euler/problem_174/sol1.py) -- Problem 180 - - [Sol1](project_euler/problem_180/sol1.py) -- Problem 188 - - [Sol1](project_euler/problem_188/sol1.py) -- Problem 191 - - [Sol1](project_euler/problem_191/sol1.py) -- Problem 203 - - [Sol1](project_euler/problem_203/sol1.py) -- Problem 205 - - [Sol1](project_euler/problem_205/sol1.py) -- Problem 206 - - [Sol1](project_euler/problem_206/sol1.py) -- Problem 207 - - [Sol1](project_euler/problem_207/sol1.py) -- Problem 234 - - [Sol1](project_euler/problem_234/sol1.py) -- Problem 301 - - [Sol1](project_euler/problem_301/sol1.py) -- Problem 493 - - [Sol1](project_euler/problem_493/sol1.py) -- Problem 551 - - [Sol1](project_euler/problem_551/sol1.py) -- Problem 587 - - [Sol1](project_euler/problem_587/sol1.py) -- Problem 686 - - [Sol1](project_euler/problem_686/sol1.py) + * Problem 001 + * [Sol1](project_euler/problem_001/sol1.py) + * [Sol2](project_euler/problem_001/sol2.py) + * [Sol3](project_euler/problem_001/sol3.py) + * [Sol4](project_euler/problem_001/sol4.py) + * [Sol5](project_euler/problem_001/sol5.py) + * [Sol6](project_euler/problem_001/sol6.py) + * [Sol7](project_euler/problem_001/sol7.py) + * Problem 002 + * [Sol1](project_euler/problem_002/sol1.py) + * [Sol2](project_euler/problem_002/sol2.py) + * [Sol3](project_euler/problem_002/sol3.py) + * [Sol4](project_euler/problem_002/sol4.py) + * [Sol5](project_euler/problem_002/sol5.py) + * Problem 003 + * [Sol1](project_euler/problem_003/sol1.py) + * [Sol2](project_euler/problem_003/sol2.py) + * [Sol3](project_euler/problem_003/sol3.py) + * Problem 004 + * [Sol1](project_euler/problem_004/sol1.py) + * [Sol2](project_euler/problem_004/sol2.py) + * Problem 005 + * [Sol1](project_euler/problem_005/sol1.py) + * [Sol2](project_euler/problem_005/sol2.py) + * Problem 006 + * [Sol1](project_euler/problem_006/sol1.py) + * [Sol2](project_euler/problem_006/sol2.py) + * [Sol3](project_euler/problem_006/sol3.py) + * [Sol4](project_euler/problem_006/sol4.py) + * Problem 007 + * [Sol1](project_euler/problem_007/sol1.py) + * [Sol2](project_euler/problem_007/sol2.py) + * [Sol3](project_euler/problem_007/sol3.py) + * Problem 008 + * [Sol1](project_euler/problem_008/sol1.py) + * [Sol2](project_euler/problem_008/sol2.py) + * [Sol3](project_euler/problem_008/sol3.py) + * Problem 009 + * [Sol1](project_euler/problem_009/sol1.py) + * [Sol2](project_euler/problem_009/sol2.py) + * [Sol3](project_euler/problem_009/sol3.py) + * Problem 010 + * [Sol1](project_euler/problem_010/sol1.py) + * [Sol2](project_euler/problem_010/sol2.py) + * [Sol3](project_euler/problem_010/sol3.py) + * Problem 011 + * [Sol1](project_euler/problem_011/sol1.py) + * [Sol2](project_euler/problem_011/sol2.py) + * Problem 012 + * [Sol1](project_euler/problem_012/sol1.py) + * [Sol2](project_euler/problem_012/sol2.py) + * Problem 013 + * [Sol1](project_euler/problem_013/sol1.py) + * Problem 014 + * [Sol1](project_euler/problem_014/sol1.py) + * [Sol2](project_euler/problem_014/sol2.py) + * Problem 015 + * [Sol1](project_euler/problem_015/sol1.py) + * Problem 016 + * [Sol1](project_euler/problem_016/sol1.py) + * [Sol2](project_euler/problem_016/sol2.py) + * Problem 017 + * [Sol1](project_euler/problem_017/sol1.py) + * Problem 018 + * [Solution](project_euler/problem_018/solution.py) + * Problem 019 + * [Sol1](project_euler/problem_019/sol1.py) + * Problem 020 + * [Sol1](project_euler/problem_020/sol1.py) + * [Sol2](project_euler/problem_020/sol2.py) + * [Sol3](project_euler/problem_020/sol3.py) + * [Sol4](project_euler/problem_020/sol4.py) + * Problem 021 + * [Sol1](project_euler/problem_021/sol1.py) + * Problem 022 + * [Sol1](project_euler/problem_022/sol1.py) + * [Sol2](project_euler/problem_022/sol2.py) + * Problem 023 + * [Sol1](project_euler/problem_023/sol1.py) + * Problem 024 + * [Sol1](project_euler/problem_024/sol1.py) + * Problem 025 + * [Sol1](project_euler/problem_025/sol1.py) + * [Sol2](project_euler/problem_025/sol2.py) + * [Sol3](project_euler/problem_025/sol3.py) + * Problem 026 + * [Sol1](project_euler/problem_026/sol1.py) + * Problem 027 + * [Sol1](project_euler/problem_027/sol1.py) + * Problem 028 + * [Sol1](project_euler/problem_028/sol1.py) + * Problem 029 + * [Sol1](project_euler/problem_029/sol1.py) + * Problem 030 + * [Sol1](project_euler/problem_030/sol1.py) + * Problem 031 + * [Sol1](project_euler/problem_031/sol1.py) + * [Sol2](project_euler/problem_031/sol2.py) + * Problem 032 + * [Sol32](project_euler/problem_032/sol32.py) + * Problem 033 + * [Sol1](project_euler/problem_033/sol1.py) + * Problem 034 + * [Sol1](project_euler/problem_034/sol1.py) + * Problem 035 + * [Sol1](project_euler/problem_035/sol1.py) + * Problem 036 + * [Sol1](project_euler/problem_036/sol1.py) + * Problem 037 + * [Sol1](project_euler/problem_037/sol1.py) + * Problem 038 + * [Sol1](project_euler/problem_038/sol1.py) + * Problem 039 + * [Sol1](project_euler/problem_039/sol1.py) + * Problem 040 + * [Sol1](project_euler/problem_040/sol1.py) + * Problem 041 + * [Sol1](project_euler/problem_041/sol1.py) + * Problem 042 + * [Solution42](project_euler/problem_042/solution42.py) + * Problem 043 + * [Sol1](project_euler/problem_043/sol1.py) + * Problem 044 + * [Sol1](project_euler/problem_044/sol1.py) + * Problem 045 + * [Sol1](project_euler/problem_045/sol1.py) + * Problem 046 + * [Sol1](project_euler/problem_046/sol1.py) + * Problem 047 + * [Sol1](project_euler/problem_047/sol1.py) + * Problem 048 + * [Sol1](project_euler/problem_048/sol1.py) + * Problem 049 + * [Sol1](project_euler/problem_049/sol1.py) + * Problem 050 + * [Sol1](project_euler/problem_050/sol1.py) + * Problem 051 + * [Sol1](project_euler/problem_051/sol1.py) + * Problem 052 + * [Sol1](project_euler/problem_052/sol1.py) + * Problem 053 + * [Sol1](project_euler/problem_053/sol1.py) + * Problem 054 + * [Sol1](project_euler/problem_054/sol1.py) + * [Test Poker Hand](project_euler/problem_054/test_poker_hand.py) + * Problem 055 + * [Sol1](project_euler/problem_055/sol1.py) + * Problem 056 + * [Sol1](project_euler/problem_056/sol1.py) + * Problem 057 + * [Sol1](project_euler/problem_057/sol1.py) + * Problem 058 + * [Sol1](project_euler/problem_058/sol1.py) + * Problem 059 + * [Sol1](project_euler/problem_059/sol1.py) + * Problem 062 + * [Sol1](project_euler/problem_062/sol1.py) + * Problem 063 + * [Sol1](project_euler/problem_063/sol1.py) + * Problem 064 + * [Sol1](project_euler/problem_064/sol1.py) + * Problem 065 + * [Sol1](project_euler/problem_065/sol1.py) + * Problem 067 + * [Sol1](project_euler/problem_067/sol1.py) + * [Sol2](project_euler/problem_067/sol2.py) + * Problem 068 + * [Sol1](project_euler/problem_068/sol1.py) + * Problem 069 + * [Sol1](project_euler/problem_069/sol1.py) + * Problem 070 + * [Sol1](project_euler/problem_070/sol1.py) + * Problem 071 + * [Sol1](project_euler/problem_071/sol1.py) + * Problem 072 + * [Sol1](project_euler/problem_072/sol1.py) + * [Sol2](project_euler/problem_072/sol2.py) + * Problem 074 + * [Sol1](project_euler/problem_074/sol1.py) + * [Sol2](project_euler/problem_074/sol2.py) + * Problem 075 + * [Sol1](project_euler/problem_075/sol1.py) + * Problem 076 + * [Sol1](project_euler/problem_076/sol1.py) + * Problem 077 + * [Sol1](project_euler/problem_077/sol1.py) + * Problem 078 + * [Sol1](project_euler/problem_078/sol1.py) + * Problem 080 + * [Sol1](project_euler/problem_080/sol1.py) + * Problem 081 + * [Sol1](project_euler/problem_081/sol1.py) + * Problem 085 + * [Sol1](project_euler/problem_085/sol1.py) + * Problem 086 + * [Sol1](project_euler/problem_086/sol1.py) + * Problem 087 + * [Sol1](project_euler/problem_087/sol1.py) + * Problem 089 + * [Sol1](project_euler/problem_089/sol1.py) + * Problem 091 + * [Sol1](project_euler/problem_091/sol1.py) + * Problem 092 + * [Sol1](project_euler/problem_092/sol1.py) + * Problem 097 + * [Sol1](project_euler/problem_097/sol1.py) + * Problem 099 + * [Sol1](project_euler/problem_099/sol1.py) + * Problem 101 + * [Sol1](project_euler/problem_101/sol1.py) + * Problem 102 + * [Sol1](project_euler/problem_102/sol1.py) + * Problem 107 + * [Sol1](project_euler/problem_107/sol1.py) + * Problem 109 + * [Sol1](project_euler/problem_109/sol1.py) + * Problem 112 + * [Sol1](project_euler/problem_112/sol1.py) + * Problem 113 + * [Sol1](project_euler/problem_113/sol1.py) + * Problem 114 + * [Sol1](project_euler/problem_114/sol1.py) + * Problem 115 + * [Sol1](project_euler/problem_115/sol1.py) + * Problem 116 + * [Sol1](project_euler/problem_116/sol1.py) + * Problem 119 + * [Sol1](project_euler/problem_119/sol1.py) + * Problem 120 + * [Sol1](project_euler/problem_120/sol1.py) + * Problem 121 + * [Sol1](project_euler/problem_121/sol1.py) + * Problem 123 + * [Sol1](project_euler/problem_123/sol1.py) + * Problem 125 + * [Sol1](project_euler/problem_125/sol1.py) + * Problem 129 + * [Sol1](project_euler/problem_129/sol1.py) + * Problem 135 + * [Sol1](project_euler/problem_135/sol1.py) + * Problem 144 + * [Sol1](project_euler/problem_144/sol1.py) + * Problem 145 + * [Sol1](project_euler/problem_145/sol1.py) + * Problem 173 + * [Sol1](project_euler/problem_173/sol1.py) + * Problem 174 + * [Sol1](project_euler/problem_174/sol1.py) + * Problem 180 + * [Sol1](project_euler/problem_180/sol1.py) + * Problem 188 + * [Sol1](project_euler/problem_188/sol1.py) + * Problem 191 + * [Sol1](project_euler/problem_191/sol1.py) + * Problem 203 + * [Sol1](project_euler/problem_203/sol1.py) + * Problem 205 + * [Sol1](project_euler/problem_205/sol1.py) + * Problem 206 + * [Sol1](project_euler/problem_206/sol1.py) + * Problem 207 + * [Sol1](project_euler/problem_207/sol1.py) + * Problem 234 + * [Sol1](project_euler/problem_234/sol1.py) + * Problem 301 + * [Sol1](project_euler/problem_301/sol1.py) + * Problem 493 + * [Sol1](project_euler/problem_493/sol1.py) + * Problem 551 + * [Sol1](project_euler/problem_551/sol1.py) + * Problem 587 + * [Sol1](project_euler/problem_587/sol1.py) + * Problem 686 + * [Sol1](project_euler/problem_686/sol1.py) ## Quantum - -- [Deutsch Jozsa](quantum/deutsch_jozsa.py) -- [Half Adder](quantum/half_adder.py) -- [Not Gate](quantum/not_gate.py) -- [Quantum Entanglement](quantum/quantum_entanglement.py) -- [Ripple Adder Classic](quantum/ripple_adder_classic.py) -- [Single Qubit Measure](quantum/single_qubit_measure.py) + * [Deutsch Jozsa](quantum/deutsch_jozsa.py) + * [Half Adder](quantum/half_adder.py) + * [Not Gate](quantum/not_gate.py) + * [Quantum Entanglement](quantum/quantum_entanglement.py) + * [Ripple Adder Classic](quantum/ripple_adder_classic.py) + * [Single Qubit Measure](quantum/single_qubit_measure.py) ## Scheduling - -- [First Come First Served](scheduling/first_come_first_served.py) -- [Highest Response Ratio Next](scheduling/highest_response_ratio_next.py) -- [Job Sequencing With Deadline](scheduling/job_sequencing_with_deadline.py) -- [Multi Level Feedback Queue](scheduling/multi_level_feedback_queue.py) -- [Non Preemptive Shortest Job First](scheduling/non_preemptive_shortest_job_first.py) -- [Round Robin](scheduling/round_robin.py) -- [Shortest Job First](scheduling/shortest_job_first.py) + * [First Come First Served](scheduling/first_come_first_served.py) + * [Highest Response Ratio Next](scheduling/highest_response_ratio_next.py) + * [Job Sequencing With Deadline](scheduling/job_sequencing_with_deadline.py) + * [Multi Level Feedback Queue](scheduling/multi_level_feedback_queue.py) + * [Non Preemptive Shortest Job First](scheduling/non_preemptive_shortest_job_first.py) + * [Round Robin](scheduling/round_robin.py) + * [Shortest Job First](scheduling/shortest_job_first.py) ## Searches - -- [Binary Search](searches/binary_search.py) -- [Binary Tree Traversal](searches/binary_tree_traversal.py) -- [Double Linear Search](searches/double_linear_search.py) -- [Double Linear Search Recursion](searches/double_linear_search_recursion.py) -- [Fibonacci Search](searches/fibonacci_search.py) -- [Hill Climbing](searches/hill_climbing.py) -- [Interpolation Search](searches/interpolation_search.py) -- [Jump Search](searches/jump_search.py) -- [Linear Search](searches/linear_search.py) -- [Quick Select](searches/quick_select.py) -- [Sentinel Linear Search](searches/sentinel_linear_search.py) -- [Simple Binary Search](searches/simple_binary_search.py) -- [Simulated Annealing](searches/simulated_annealing.py) -- [Tabu Search](searches/tabu_search.py) -- [Ternary Search](searches/ternary_search.py) + * [Binary Search](searches/binary_search.py) + * [Binary Tree Traversal](searches/binary_tree_traversal.py) + * [Double Linear Search](searches/double_linear_search.py) + * [Double Linear Search Recursion](searches/double_linear_search_recursion.py) + * [Fibonacci Search](searches/fibonacci_search.py) + * [Hill Climbing](searches/hill_climbing.py) + * [Interpolation Search](searches/interpolation_search.py) + * [Jump Search](searches/jump_search.py) + * [Linear Search](searches/linear_search.py) + * [Quick Select](searches/quick_select.py) + * [Sentinel Linear Search](searches/sentinel_linear_search.py) + * [Simple Binary Search](searches/simple_binary_search.py) + * [Simulated Annealing](searches/simulated_annealing.py) + * [Tabu Search](searches/tabu_search.py) + * [Ternary Search](searches/ternary_search.py) ## Sorts - -- [Bead Sort](sorts/bead_sort.py) -- [Bitonic Sort](sorts/bitonic_sort.py) -- [Bogo Sort](sorts/bogo_sort.py) -- [Bubble Sort](sorts/bubble_sort.py) -- [Bucket Sort](sorts/bucket_sort.py) -- [Circle Sort](sorts/circle_sort.py) -- [Cocktail Shaker Sort](sorts/cocktail_shaker_sort.py) -- [Comb Sort](sorts/comb_sort.py) -- [Counting Sort](sorts/counting_sort.py) -- [Cycle Sort](sorts/cycle_sort.py) -- [Double Sort](sorts/double_sort.py) -- [Dutch National Flag Sort](sorts/dutch_national_flag_sort.py) -- [Exchange Sort](sorts/exchange_sort.py) -- [External Sort](sorts/external_sort.py) -- [Gnome Sort](sorts/gnome_sort.py) -- [Heap Sort](sorts/heap_sort.py) -- [Insertion Sort](sorts/insertion_sort.py) -- [Intro Sort](sorts/intro_sort.py) -- [Iterative Merge Sort](sorts/iterative_merge_sort.py) -- [Merge Insertion Sort](sorts/merge_insertion_sort.py) -- [Merge Sort](sorts/merge_sort.py) -- [Msd Radix Sort](sorts/msd_radix_sort.py) -- [Natural Sort](sorts/natural_sort.py) -- [Odd Even Sort](sorts/odd_even_sort.py) -- [Odd Even Transposition Parallel](sorts/odd_even_transposition_parallel.py) -- [Odd Even Transposition Single Threaded](sorts/odd_even_transposition_single_threaded.py) -- [Pancake Sort](sorts/pancake_sort.py) -- [Patience Sort](sorts/patience_sort.py) -- [Pigeon Sort](sorts/pigeon_sort.py) -- [Pigeonhole Sort](sorts/pigeonhole_sort.py) -- [Quick Sort](sorts/quick_sort.py) -- [Quick Sort 3 Partition](sorts/quick_sort_3_partition.py) -- [Radix Sort](sorts/radix_sort.py) -- [Random Normal Distribution Quicksort](sorts/random_normal_distribution_quicksort.py) -- [Random Pivot Quick Sort](sorts/random_pivot_quick_sort.py) -- [Recursive Bubble Sort](sorts/recursive_bubble_sort.py) -- [Recursive Insertion Sort](sorts/recursive_insertion_sort.py) -- [Recursive Mergesort Array](sorts/recursive_mergesort_array.py) -- [Recursive Quick Sort](sorts/recursive_quick_sort.py) -- [Selection Sort](sorts/selection_sort.py) -- [Shell Sort](sorts/shell_sort.py) -- [Shrink Shell Sort](sorts/shrink_shell_sort.py) -- [Slowsort](sorts/slowsort.py) -- [Stooge Sort](sorts/stooge_sort.py) -- [Strand Sort](sorts/strand_sort.py) -- [Tim Sort](sorts/tim_sort.py) -- [Topological Sort](sorts/topological_sort.py) -- [Tree Sort](sorts/tree_sort.py) -- [Unknown Sort](sorts/unknown_sort.py) -- [Wiggle Sort](sorts/wiggle_sort.py) + * [Bead Sort](sorts/bead_sort.py) + * [Bitonic Sort](sorts/bitonic_sort.py) + * [Bogo Sort](sorts/bogo_sort.py) + * [Bubble Sort](sorts/bubble_sort.py) + * [Bucket Sort](sorts/bucket_sort.py) + * [Circle Sort](sorts/circle_sort.py) + * [Cocktail Shaker Sort](sorts/cocktail_shaker_sort.py) + * [Comb Sort](sorts/comb_sort.py) + * [Counting Sort](sorts/counting_sort.py) + * [Cycle Sort](sorts/cycle_sort.py) + * [Double Sort](sorts/double_sort.py) + * [Dutch National Flag Sort](sorts/dutch_national_flag_sort.py) + * [Exchange Sort](sorts/exchange_sort.py) + * [External Sort](sorts/external_sort.py) + * [Gnome Sort](sorts/gnome_sort.py) + * [Heap Sort](sorts/heap_sort.py) + * [Insertion Sort](sorts/insertion_sort.py) + * [Intro Sort](sorts/intro_sort.py) + * [Iterative Merge Sort](sorts/iterative_merge_sort.py) + * [Merge Insertion Sort](sorts/merge_insertion_sort.py) + * [Merge Sort](sorts/merge_sort.py) + * [Msd Radix Sort](sorts/msd_radix_sort.py) + * [Natural Sort](sorts/natural_sort.py) + * [Odd Even Sort](sorts/odd_even_sort.py) + * [Odd Even Transposition Parallel](sorts/odd_even_transposition_parallel.py) + * [Odd Even Transposition Single Threaded](sorts/odd_even_transposition_single_threaded.py) + * [Pancake Sort](sorts/pancake_sort.py) + * [Patience Sort](sorts/patience_sort.py) + * [Pigeon Sort](sorts/pigeon_sort.py) + * [Pigeonhole Sort](sorts/pigeonhole_sort.py) + * [Quick Sort](sorts/quick_sort.py) + * [Quick Sort 3 Partition](sorts/quick_sort_3_partition.py) + * [Radix Sort](sorts/radix_sort.py) + * [Random Normal Distribution Quicksort](sorts/random_normal_distribution_quicksort.py) + * [Random Pivot Quick Sort](sorts/random_pivot_quick_sort.py) + * [Recursive Bubble Sort](sorts/recursive_bubble_sort.py) + * [Recursive Insertion Sort](sorts/recursive_insertion_sort.py) + * [Recursive Mergesort Array](sorts/recursive_mergesort_array.py) + * [Recursive Quick Sort](sorts/recursive_quick_sort.py) + * [Selection Sort](sorts/selection_sort.py) + * [Shell Sort](sorts/shell_sort.py) + * [Shrink Shell Sort](sorts/shrink_shell_sort.py) + * [Slowsort](sorts/slowsort.py) + * [Stooge Sort](sorts/stooge_sort.py) + * [Strand Sort](sorts/strand_sort.py) + * [Tim Sort](sorts/tim_sort.py) + * [Topological Sort](sorts/topological_sort.py) + * [Tree Sort](sorts/tree_sort.py) + * [Unknown Sort](sorts/unknown_sort.py) + * [Wiggle Sort](sorts/wiggle_sort.py) ## Strings - -- [Aho Corasick](strings/aho_corasick.py) -- [Alternative String Arrange](strings/alternative_string_arrange.py) -- [Anagrams](strings/anagrams.py) -- [Autocomplete Using Trie](strings/autocomplete_using_trie.py) -- [Barcode Validator](strings/barcode_validator.py) -- [Boyer Moore Search](strings/boyer_moore_search.py) -- [Can String Be Rearranged As Palindrome](strings/can_string_be_rearranged_as_palindrome.py) -- [Capitalize](strings/capitalize.py) -- [Check Anagrams](strings/check_anagrams.py) -- [Check Pangram](strings/check_pangram.py) -- [Credit Card Validator](strings/credit_card_validator.py) -- [Detecting English Programmatically](strings/detecting_english_programmatically.py) -- [Dna](strings/dna.py) -- [Frequency Finder](strings/frequency_finder.py) -- [Hamming Distance](strings/hamming_distance.py) -- [Indian Phone Validator](strings/indian_phone_validator.py) -- [Is Contains Unique Chars](strings/is_contains_unique_chars.py) -- [Is Palindrome](strings/is_palindrome.py) -- [Jaro Winkler](strings/jaro_winkler.py) -- [Join](strings/join.py) -- [Knuth Morris Pratt](strings/knuth_morris_pratt.py) -- [Levenshtein Distance](strings/levenshtein_distance.py) -- [Lower](strings/lower.py) -- [Manacher](strings/manacher.py) -- [Min Cost String Conversion](strings/min_cost_string_conversion.py) -- [Naive String Search](strings/naive_string_search.py) -- [Ngram](strings/ngram.py) -- [Palindrome](strings/palindrome.py) -- [Prefix Function](strings/prefix_function.py) -- [Rabin Karp](strings/rabin_karp.py) -- [Remove Duplicate](strings/remove_duplicate.py) -- [Reverse Letters](strings/reverse_letters.py) -- [Reverse Long Words](strings/reverse_long_words.py) -- [Reverse Words](strings/reverse_words.py) -- [Snake Case To Camel Pascal Case](strings/snake_case_to_camel_pascal_case.py) -- [Split](strings/split.py) -- [Upper](strings/upper.py) -- [Wave](strings/wave.py) -- [Wildcard Pattern Matching](strings/wildcard_pattern_matching.py) -- [Word Occurrence](strings/word_occurrence.py) -- [Word Patterns](strings/word_patterns.py) -- [Z Function](strings/z_function.py) + * [Aho Corasick](strings/aho_corasick.py) + * [Alternative String Arrange](strings/alternative_string_arrange.py) + * [Anagrams](strings/anagrams.py) + * [Autocomplete Using Trie](strings/autocomplete_using_trie.py) + * [Barcode Validator](strings/barcode_validator.py) + * [Boyer Moore Search](strings/boyer_moore_search.py) + * [Can String Be Rearranged As Palindrome](strings/can_string_be_rearranged_as_palindrome.py) + * [Capitalize](strings/capitalize.py) + * [Check Anagrams](strings/check_anagrams.py) + * [Check Pangram](strings/check_pangram.py) + * [Credit Card Validator](strings/credit_card_validator.py) + * [Detecting English Programmatically](strings/detecting_english_programmatically.py) + * [Dna](strings/dna.py) + * [Frequency Finder](strings/frequency_finder.py) + * [Hamming Distance](strings/hamming_distance.py) + * [Indian Phone Validator](strings/indian_phone_validator.py) + * [Is Contains Unique Chars](strings/is_contains_unique_chars.py) + * [Is Palindrome](strings/is_palindrome.py) + * [Jaro Winkler](strings/jaro_winkler.py) + * [Join](strings/join.py) + * [Knuth Morris Pratt](strings/knuth_morris_pratt.py) + * [Levenshtein Distance](strings/levenshtein_distance.py) + * [Lower](strings/lower.py) + * [Manacher](strings/manacher.py) + * [Min Cost String Conversion](strings/min_cost_string_conversion.py) + * [Naive String Search](strings/naive_string_search.py) + * [Ngram](strings/ngram.py) + * [Palindrome](strings/palindrome.py) + * [Prefix Function](strings/prefix_function.py) + * [Rabin Karp](strings/rabin_karp.py) + * [Remove Duplicate](strings/remove_duplicate.py) + * [Reverse Letters](strings/reverse_letters.py) + * [Reverse Long Words](strings/reverse_long_words.py) + * [Reverse Words](strings/reverse_words.py) + * [Snake Case To Camel Pascal Case](strings/snake_case_to_camel_pascal_case.py) + * [Split](strings/split.py) + * [Upper](strings/upper.py) + * [Wave](strings/wave.py) + * [Wildcard Pattern Matching](strings/wildcard_pattern_matching.py) + * [Word Occurrence](strings/word_occurrence.py) + * [Word Patterns](strings/word_patterns.py) + * [Z Function](strings/z_function.py) ## Web Programming - -- [Co2 Emission](web_programming/co2_emission.py) -- [Covid Stats Via Xpath](web_programming/covid_stats_via_xpath.py) -- [Crawl Google Results](web_programming/crawl_google_results.py) -- [Crawl Google Scholar Citation](web_programming/crawl_google_scholar_citation.py) -- [Currency Converter](web_programming/currency_converter.py) -- [Current Stock Price](web_programming/current_stock_price.py) -- [Current Weather](web_programming/current_weather.py) -- [Daily Horoscope](web_programming/daily_horoscope.py) -- [Download Images From Google Query](web_programming/download_images_from_google_query.py) -- [Emails From Url](web_programming/emails_from_url.py) -- [Fetch Anime And Play](web_programming/fetch_anime_and_play.py) -- [Fetch Bbc News](web_programming/fetch_bbc_news.py) -- [Fetch Github Info](web_programming/fetch_github_info.py) -- [Fetch Jobs](web_programming/fetch_jobs.py) -- [Fetch Quotes](web_programming/fetch_quotes.py) -- [Fetch Well Rx Price](web_programming/fetch_well_rx_price.py) -- [Get Imdb Top 250 Movies Csv](web_programming/get_imdb_top_250_movies_csv.py) -- [Get Imdbtop](web_programming/get_imdbtop.py) -- [Get Top Hn Posts](web_programming/get_top_hn_posts.py) -- [Get User Tweets](web_programming/get_user_tweets.py) -- [Giphy](web_programming/giphy.py) -- [Instagram Crawler](web_programming/instagram_crawler.py) -- [Instagram Pic](web_programming/instagram_pic.py) -- [Instagram Video](web_programming/instagram_video.py) -- [Nasa Data](web_programming/nasa_data.py) -- [Open Google Results](web_programming/open_google_results.py) -- [Random Anime Character](web_programming/random_anime_character.py) -- [Recaptcha Verification](web_programming/recaptcha_verification.py) -- [Reddit](web_programming/reddit.py) -- [Search Books By Isbn](web_programming/search_books_by_isbn.py) -- [Slack Message](web_programming/slack_message.py) -- [Test Fetch Github Info](web_programming/test_fetch_github_info.py) -- [World Covid19 Stats](web_programming/world_covid19_stats.py) + * [Co2 Emission](web_programming/co2_emission.py) + * [Covid Stats Via Xpath](web_programming/covid_stats_via_xpath.py) + * [Crawl Google Results](web_programming/crawl_google_results.py) + * [Crawl Google Scholar Citation](web_programming/crawl_google_scholar_citation.py) + * [Currency Converter](web_programming/currency_converter.py) + * [Current Stock Price](web_programming/current_stock_price.py) + * [Current Weather](web_programming/current_weather.py) + * [Daily Horoscope](web_programming/daily_horoscope.py) + * [Download Images From Google Query](web_programming/download_images_from_google_query.py) + * [Emails From Url](web_programming/emails_from_url.py) + * [Fetch Anime And Play](web_programming/fetch_anime_and_play.py) + * [Fetch Bbc News](web_programming/fetch_bbc_news.py) + * [Fetch Github Info](web_programming/fetch_github_info.py) + * [Fetch Jobs](web_programming/fetch_jobs.py) + * [Fetch Quotes](web_programming/fetch_quotes.py) + * [Fetch Well Rx Price](web_programming/fetch_well_rx_price.py) + * [Get Imdb Top 250 Movies Csv](web_programming/get_imdb_top_250_movies_csv.py) + * [Get Imdbtop](web_programming/get_imdbtop.py) + * [Get Top Hn Posts](web_programming/get_top_hn_posts.py) + * [Get User Tweets](web_programming/get_user_tweets.py) + * [Giphy](web_programming/giphy.py) + * [Instagram Crawler](web_programming/instagram_crawler.py) + * [Instagram Pic](web_programming/instagram_pic.py) + * [Instagram Video](web_programming/instagram_video.py) + * [Nasa Data](web_programming/nasa_data.py) + * [Open Google Results](web_programming/open_google_results.py) + * [Random Anime Character](web_programming/random_anime_character.py) + * [Recaptcha Verification](web_programming/recaptcha_verification.py) + * [Reddit](web_programming/reddit.py) + * [Search Books By Isbn](web_programming/search_books_by_isbn.py) + * [Slack Message](web_programming/slack_message.py) + * [Test Fetch Github Info](web_programming/test_fetch_github_info.py) + * [World Covid19 Stats](web_programming/world_covid19_stats.py) From 242d795d9a0b31455490de7529c24e6a0e7161d1 Mon Sep 17 00:00:00 2001 From: Wissam Fawaz Date: Sun, 16 Oct 2022 15:51:49 +0300 Subject: [PATCH 07/12] Reversed changed to .md files --- CONTRIBUTING.md | 66 +++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5a07af100ee..01f29094417e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Before contributing -Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before sending your pull requests, make sure that you __read the whole guidelines__. If you have any doubt on the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community in [Gitter](https://gitter.im/TheAlgorithms). +Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before sending your pull requests, make sure that you **read the whole guidelines**. If you have any doubt on the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community in [Gitter](https://gitter.im/TheAlgorithms). ## Contributing @@ -15,47 +15,51 @@ We are very happy that you consider implementing algorithms and data structures - Your work will be distributed under [MIT License](LICENSE.md) once your pull request is merged - Your submitted work fulfils or mostly fulfils our styles and standards -__New implementation__ is welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity but __identical implementation__ of an existing implementation is not allowed. Please check whether the solution is already implemented or not before submitting your pull request. +**New implementation** is welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity but **identical implementation** of an existing implementation is not allowed. Please check whether the solution is already implemented or not before submitting your pull request. -__Improving comments__ and __writing proper tests__ are also highly welcome. +**Improving comments** and **writing proper tests** are also highly welcome. ### Contribution We appreciate any contribution, from fixing a grammar mistake in a comment to implementing complex algorithms. Please read this section if you are contributing your work. -Your contribution will be tested by our [automated testing on GitHub Actions](https://github.com/TheAlgorithms/Python/actions) to save time and mental energy. After you have submitted your pull request, you should see the GitHub Actions tests start to run at the bottom of your submission page. If those tests fail, then click on the ___details___ button try to read through the GitHub Actions output to understand the failure. If you do not understand, please leave a comment on your submission page and a community member will try to help. +Your contribution will be tested by our [automated testing on GitHub Actions](https://github.com/TheAlgorithms/Python/actions) to save time and mental energy. After you have submitted your pull request, you should see the GitHub Actions tests start to run at the bottom of your submission page. If those tests fail, then click on the **_details_** button try to read through the GitHub Actions output to understand the failure. If you do not understand, please leave a comment on your submission page and a community member will try to help. Please help us keep our issue list small by adding fixes: #{$ISSUE_NO} to the commit message of pull requests that resolve open issues. GitHub will use this tag to auto-close the issue when the PR is merged. #### What is an Algorithm? An Algorithm is one or more functions (or classes) that: -* take one or more inputs, -* perform some internal calculations or data manipulations, -* return one or more outputs, -* have minimal side effects (Ex. `print()`, `plot()`, `read()`, `write()`). + +- take one or more inputs, +- perform some internal calculations or data manipulations, +- return one or more outputs, +- have minimal side effects (Ex. `print()`, `plot()`, `read()`, `write()`). Algorithms should be packaged in a way that would make it easy for readers to put them into larger programs. Algorithms should: -* have intuitive class and function names that make their purpose clear to readers -* use Python naming conventions and intuitive variable names to ease comprehension -* be flexible to take different input values -* have Python type hints for their input parameters and return values -* raise Python exceptions (`ValueError`, etc.) on erroneous input values -* have docstrings with clear explanations and/or URLs to source materials -* contain doctests that test both valid and erroneous input values -* return all calculation results instead of printing or plotting them -Algorithms in this repo should not be how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values. Those calculations or manipulations can use data types, classes, or functions of existing Python packages but each algorithm in this repo should add unique value. +- have intuitive class and function names that make their purpose clear to readers +- use Python naming conventions and intuitive variable names to ease comprehension +- be flexible to take different input values +- have Python type hints for their input parameters and return values +- raise Python exceptions (`ValueError`, etc.) on erroneous input values +- have docstrings with clear explanations and/or URLs to source materials +- contain doctests that test both valid and erroneous input values +- return all calculation results instead of printing or plotting them + +Algorithms in this repo should not be how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values. Those calculations or manipulations can use data types, classes, or functions of existing Python packages but each algorithm in this repo should add unique value. #### Pre-commit plugin + Use [pre-commit](https://pre-commit.com/#installation) to automatically format your code to match our coding style: ```bash python3 -m pip install pre-commit # only required the first time pre-commit install ``` + That's it! The plugin will run every time you commit any changes. If there are any errors found during the run, fix them and commit those changes. You can even run the plugin manually on all files: ```bash @@ -66,15 +70,16 @@ pre-commit run --all-files --show-diff-on-failure We want your work to be readable by others; therefore, we encourage you to note the following: -- Please write in Python 3.9+. For instance: `print()` is a function in Python 3 so `print "Hello"` will *not* work but `print("Hello")` will. -- Please focus hard on the naming of functions, classes, and variables. Help your reader by using __descriptive names__ that can help you to remove redundant comments. - - Single letter variable names are *old school* so please avoid them unless their life only spans a few lines. +- Please write in Python 3.9+. For instance: `print()` is a function in Python 3 so `print "Hello"` will _not_ work but `print("Hello")` will. +- Please focus hard on the naming of functions, classes, and variables. Help your reader by using **descriptive names** that can help you to remove redundant comments. + + - Single letter variable names are _old school_ so please avoid them unless their life only spans a few lines. - Expand acronyms because `gcd()` is hard to understand but `greatest_common_divisor()` is not. - Please follow the [Python Naming Conventions](https://pep8.org/#prescriptive-naming-conventions) so variable_names and function_names should be lower_case, CONSTANTS in UPPERCASE, ClassNames should be CamelCase, etc. - We encourage the use of Python [f-strings](https://realpython.com/python-f-strings/#f-strings-a-new-and-improved-way-to-format-strings-in-python) where they make the code easier to read. -- Please consider running [__psf/black__](https://github.com/python/black) on your Python file(s) before submitting your pull request. This is not yet a requirement but it does make your code more readable and automatically aligns it with much of [PEP 8](https://www.python.org/dev/peps/pep-0008/). There are other code formatters (autopep8, yapf) but the __black__ formatter is now hosted by the Python Software Foundation. To use it, +- Please consider running [**psf/black**](https://github.com/python/black) on your Python file(s) before submitting your pull request. This is not yet a requirement but it does make your code more readable and automatically aligns it with much of [PEP 8](https://www.python.org/dev/peps/pep-0008/). There are other code formatters (autopep8, yapf) but the **black** formatter is now hosted by the Python Software Foundation. To use it, ```bash python3 -m pip install black # only required the first time @@ -112,7 +117,7 @@ We want your work to be readable by others; therefore, we encourage you to note return a + b ``` -- Write tests (especially [__doctests__](https://docs.python.org/3/library/doctest.html)) to illustrate and verify your work. We highly encourage the use of _doctests on all functions_. +- Write tests (especially [**doctests**](https://docs.python.org/3/library/doctest.html)) to illustrate and verify your work. We highly encourage the use of _doctests on all functions_. ```python def sum_ab(a, b): @@ -134,7 +139,7 @@ We want your work to be readable by others; therefore, we encourage you to note python3 -m doctest -v my_submission.py ``` - The use of the Python builtin `input()` function is __not__ encouraged: + The use of the Python builtin `input()` function is **not** encouraged: ```python input('Enter your input:') @@ -148,7 +153,7 @@ We want your work to be readable by others; therefore, we encourage you to note starting_value = int(input("Please enter a starting value: ").strip()) ``` - The use of [Python type hints](https://docs.python.org/3/library/typing.html) is encouraged for function parameters and return values. Our automated testing will run [mypy](http://mypy-lang.org) so run that locally before making your submission. + The use of [Python type hints](https://docs.python.org/3/library/typing.html) is encouraged for function parameters and return values. Our automated testing will run [mypy](http://mypy-lang.org) so run that locally before making your submission. ```python def sum_ab(a: int, b: int) -> int: @@ -157,26 +162,27 @@ We want your work to be readable by others; therefore, we encourage you to note Instructions on how to install mypy can be found [here](https://github.com/python/mypy). Please use the command `mypy --ignore-missing-imports .` to test all files or `mypy --ignore-missing-imports path/to/file.py` to test a specific file. -- [__List comprehensions and generators__](https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions) are preferred over the use of `lambda`, `map`, `filter`, `reduce` but the important thing is to demonstrate the power of Python in code that is easy to read and maintain. +- [**List comprehensions and generators**](https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions) are preferred over the use of `lambda`, `map`, `filter`, `reduce` but the important thing is to demonstrate the power of Python in code that is easy to read and maintain. - Avoid importing external libraries for basic algorithms. Only use those libraries for complicated algorithms. -- If you need a third-party module that is not in the file __requirements.txt__, please add it to that file as part of your submission. +- If you need a third-party module that is not in the file **requirements.txt**, please add it to that file as part of your submission. #### Other Requirements for Submissions + - If you are submitting code in the `project_euler/` directory, please also read [the dedicated Guideline](https://github.com/TheAlgorithms/Python/blob/master/project_euler/README.md) before contributing to our Project Euler library. - The file extension for code files should be `.py`. Jupyter Notebooks should be submitted to [TheAlgorithms/Jupyter](https://github.com/TheAlgorithms/Jupyter). - Strictly use snake_case (underscore_separated) in your file_name, as it will be easy to parse in future using scripts. - Please avoid creating new directories if at all possible. Try to fit your work into the existing directory structure. -- If possible, follow the standard *within* the folder you are submitting to. +- If possible, follow the standard _within_ the folder you are submitting to. - If you have modified/added code work, make sure the code compiles before submitting. - If you have modified/added documentation work, ensure your language is concise and contains no grammar errors. - Do not update the README.md or DIRECTORY.md file which will be periodically autogenerated by our GitHub Actions processes. - Add a corresponding explanation to [Algorithms-Explanation](https://github.com/TheAlgorithms/Algorithms-Explanation) (Optional but recommended). -- All submissions will be tested with [__mypy__](http://www.mypy-lang.org) so we encourage you to add [__Python type hints__](https://docs.python.org/3/library/typing.html) where it makes sense to do so. +- All submissions will be tested with [**mypy**](http://www.mypy-lang.org) so we encourage you to add [**Python type hints**](https://docs.python.org/3/library/typing.html) where it makes sense to do so. - Most importantly, - - __Be consistent in the use of these guidelines when submitting.__ - - __Join__ us on [Discord](https://discord.com/invite/c7MnfGFGa6) and [Gitter](https://gitter.im/TheAlgorithms) __now!__ + - **Be consistent in the use of these guidelines when submitting.** + - **Join** us on [Discord](https://discord.com/invite/c7MnfGFGa6) and [Gitter](https://gitter.im/TheAlgorithms) **now!** - Happy coding! Writer [@poyea](https://github.com/poyea), Jun 2019. From cc6be0638ed38d47ca7e45e5dd7782bc6f9b00a5 Mon Sep 17 00:00:00 2001 From: Wissam Fawaz <55150850+wissamfawaz@users.noreply.github.com> Date: Sun, 16 Oct 2022 18:59:29 +0300 Subject: [PATCH 08/12] Update other/pascal_triangle.py Removed personal info Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com> --- other/pascal_triangle.py | 1 - 1 file changed, 1 deletion(-) diff --git a/other/pascal_triangle.py b/other/pascal_triangle.py index 48fbe6231b46..480d2072296e 100644 --- a/other/pascal_triangle.py +++ b/other/pascal_triangle.py @@ -1,5 +1,4 @@ """ -wissamfawaz12@gmail.com | github.com/wissamfawaz This implementation demonstrates how to generate the elements of a Pascal's triangle. What is Pascal's triangle? From 029aabd880df0760e20430137e51a0375007b293 Mon Sep 17 00:00:00 2001 From: Wissam Fawaz <55150850+wissamfawaz@users.noreply.github.com> Date: Sun, 16 Oct 2022 19:08:24 +0300 Subject: [PATCH 09/12] Update pascal_triangle.py Expanded the description of the algorithm --- other/pascal_triangle.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/other/pascal_triangle.py b/other/pascal_triangle.py index 480d2072296e..876ac0a0324c 100644 --- a/other/pascal_triangle.py +++ b/other/pascal_triangle.py @@ -1,8 +1,12 @@ """ This implementation demonstrates how to generate the -elements of a Pascal's triangle. +elements of a Pascal's triangle. The element having +a row index of r and column index of c can be derived +as follows: +triangle[r][c] = triangle[r-1][c-1]+triangle[r-1][c] What is Pascal's triangle? -- Refer to (https://en.wikipedia.org/wiki/Pascal%27s_triangle) +- It is a triangular array containing binomial coefficients. +Refer to (https://en.wikipedia.org/wiki/Pascal%27s_triangle) for more info about this triangle. """ From 28dc3e72440cde027531654eb118c878f5dd3cb8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 16 Oct 2022 16:09:28 +0000 Subject: [PATCH 10/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- other/pascal_triangle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/pascal_triangle.py b/other/pascal_triangle.py index 876ac0a0324c..9bf114f80ce1 100644 --- a/other/pascal_triangle.py +++ b/other/pascal_triangle.py @@ -5,7 +5,7 @@ as follows: triangle[r][c] = triangle[r-1][c-1]+triangle[r-1][c] What is Pascal's triangle? -- It is a triangular array containing binomial coefficients. +- It is a triangular array containing binomial coefficients. Refer to (https://en.wikipedia.org/wiki/Pascal%27s_triangle) for more info about this triangle. """ From 4d18c82111e73e463c0e10c164a1882779bf8d48 Mon Sep 17 00:00:00 2001 From: Wissam Fawaz Date: Sun, 16 Oct 2022 19:43:30 +0300 Subject: [PATCH 11/12] Printed output in triangular form --- other/pascal_triangle.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/other/pascal_triangle.py b/other/pascal_triangle.py index 9bf114f80ce1..5cc3cee8af56 100644 --- a/other/pascal_triangle.py +++ b/other/pascal_triangle.py @@ -11,9 +11,33 @@ """ -def generate_pascal_triangle(num_rows: int) -> list[list[int]]: +def print_pascal_triangle(num_rows: int) -> None: """ Print Pascal's triangle for different number of rows + >>> print_pascal_triangle(5) + 1 + 1 1 + 1 2 1 + 1 3 3 1 + 1 4 6 4 1 + """ + triangle = generate_pascal_triangle(num_rows) + for row_idx in range(num_rows): + # Print left spaces + for _ in range(num_rows - row_idx - 1): + print(end=" ") + # Print row values + for col_idx in range(row_idx + 1): + if col_idx != row_idx: + print(triangle[row_idx][col_idx], end=" ") + else: + print(triangle[row_idx][col_idx], end="") + print() + + +def generate_pascal_triangle(num_rows: int) -> list[list[int]]: + """ + Create Pascal's triangle for different number of rows >>> generate_pascal_triangle(1) [[1]] >>> generate_pascal_triangle(2) From 58da7d7d0c43608bde563c5c327fc19f75aa90dd Mon Sep 17 00:00:00 2001 From: Wissam Fawaz <55150850+wissamfawaz@users.noreply.github.com> Date: Sun, 16 Oct 2022 19:46:43 +0300 Subject: [PATCH 12/12] Update CONTRIBUTING.md --- CONTRIBUTING.md | 66 ++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 01f29094417e..b5a07af100ee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Before contributing -Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before sending your pull requests, make sure that you **read the whole guidelines**. If you have any doubt on the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community in [Gitter](https://gitter.im/TheAlgorithms). +Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before sending your pull requests, make sure that you __read the whole guidelines__. If you have any doubt on the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community in [Gitter](https://gitter.im/TheAlgorithms). ## Contributing @@ -15,51 +15,47 @@ We are very happy that you consider implementing algorithms and data structures - Your work will be distributed under [MIT License](LICENSE.md) once your pull request is merged - Your submitted work fulfils or mostly fulfils our styles and standards -**New implementation** is welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity but **identical implementation** of an existing implementation is not allowed. Please check whether the solution is already implemented or not before submitting your pull request. +__New implementation__ is welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity but __identical implementation__ of an existing implementation is not allowed. Please check whether the solution is already implemented or not before submitting your pull request. -**Improving comments** and **writing proper tests** are also highly welcome. +__Improving comments__ and __writing proper tests__ are also highly welcome. ### Contribution We appreciate any contribution, from fixing a grammar mistake in a comment to implementing complex algorithms. Please read this section if you are contributing your work. -Your contribution will be tested by our [automated testing on GitHub Actions](https://github.com/TheAlgorithms/Python/actions) to save time and mental energy. After you have submitted your pull request, you should see the GitHub Actions tests start to run at the bottom of your submission page. If those tests fail, then click on the **_details_** button try to read through the GitHub Actions output to understand the failure. If you do not understand, please leave a comment on your submission page and a community member will try to help. +Your contribution will be tested by our [automated testing on GitHub Actions](https://github.com/TheAlgorithms/Python/actions) to save time and mental energy. After you have submitted your pull request, you should see the GitHub Actions tests start to run at the bottom of your submission page. If those tests fail, then click on the ___details___ button try to read through the GitHub Actions output to understand the failure. If you do not understand, please leave a comment on your submission page and a community member will try to help. Please help us keep our issue list small by adding fixes: #{$ISSUE_NO} to the commit message of pull requests that resolve open issues. GitHub will use this tag to auto-close the issue when the PR is merged. #### What is an Algorithm? An Algorithm is one or more functions (or classes) that: - -- take one or more inputs, -- perform some internal calculations or data manipulations, -- return one or more outputs, -- have minimal side effects (Ex. `print()`, `plot()`, `read()`, `write()`). +* take one or more inputs, +* perform some internal calculations or data manipulations, +* return one or more outputs, +* have minimal side effects (Ex. `print()`, `plot()`, `read()`, `write()`). Algorithms should be packaged in a way that would make it easy for readers to put them into larger programs. Algorithms should: +* have intuitive class and function names that make their purpose clear to readers +* use Python naming conventions and intuitive variable names to ease comprehension +* be flexible to take different input values +* have Python type hints for their input parameters and return values +* raise Python exceptions (`ValueError`, etc.) on erroneous input values +* have docstrings with clear explanations and/or URLs to source materials +* contain doctests that test both valid and erroneous input values +* return all calculation results instead of printing or plotting them -- have intuitive class and function names that make their purpose clear to readers -- use Python naming conventions and intuitive variable names to ease comprehension -- be flexible to take different input values -- have Python type hints for their input parameters and return values -- raise Python exceptions (`ValueError`, etc.) on erroneous input values -- have docstrings with clear explanations and/or URLs to source materials -- contain doctests that test both valid and erroneous input values -- return all calculation results instead of printing or plotting them - -Algorithms in this repo should not be how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values. Those calculations or manipulations can use data types, classes, or functions of existing Python packages but each algorithm in this repo should add unique value. +Algorithms in this repo should not be how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values. Those calculations or manipulations can use data types, classes, or functions of existing Python packages but each algorithm in this repo should add unique value. #### Pre-commit plugin - Use [pre-commit](https://pre-commit.com/#installation) to automatically format your code to match our coding style: ```bash python3 -m pip install pre-commit # only required the first time pre-commit install ``` - That's it! The plugin will run every time you commit any changes. If there are any errors found during the run, fix them and commit those changes. You can even run the plugin manually on all files: ```bash @@ -70,16 +66,15 @@ pre-commit run --all-files --show-diff-on-failure We want your work to be readable by others; therefore, we encourage you to note the following: -- Please write in Python 3.9+. For instance: `print()` is a function in Python 3 so `print "Hello"` will _not_ work but `print("Hello")` will. -- Please focus hard on the naming of functions, classes, and variables. Help your reader by using **descriptive names** that can help you to remove redundant comments. - - - Single letter variable names are _old school_ so please avoid them unless their life only spans a few lines. +- Please write in Python 3.9+. For instance: `print()` is a function in Python 3 so `print "Hello"` will *not* work but `print("Hello")` will. +- Please focus hard on the naming of functions, classes, and variables. Help your reader by using __descriptive names__ that can help you to remove redundant comments. + - Single letter variable names are *old school* so please avoid them unless their life only spans a few lines. - Expand acronyms because `gcd()` is hard to understand but `greatest_common_divisor()` is not. - Please follow the [Python Naming Conventions](https://pep8.org/#prescriptive-naming-conventions) so variable_names and function_names should be lower_case, CONSTANTS in UPPERCASE, ClassNames should be CamelCase, etc. - We encourage the use of Python [f-strings](https://realpython.com/python-f-strings/#f-strings-a-new-and-improved-way-to-format-strings-in-python) where they make the code easier to read. -- Please consider running [**psf/black**](https://github.com/python/black) on your Python file(s) before submitting your pull request. This is not yet a requirement but it does make your code more readable and automatically aligns it with much of [PEP 8](https://www.python.org/dev/peps/pep-0008/). There are other code formatters (autopep8, yapf) but the **black** formatter is now hosted by the Python Software Foundation. To use it, +- Please consider running [__psf/black__](https://github.com/python/black) on your Python file(s) before submitting your pull request. This is not yet a requirement but it does make your code more readable and automatically aligns it with much of [PEP 8](https://www.python.org/dev/peps/pep-0008/). There are other code formatters (autopep8, yapf) but the __black__ formatter is now hosted by the Python Software Foundation. To use it, ```bash python3 -m pip install black # only required the first time @@ -117,7 +112,7 @@ We want your work to be readable by others; therefore, we encourage you to note return a + b ``` -- Write tests (especially [**doctests**](https://docs.python.org/3/library/doctest.html)) to illustrate and verify your work. We highly encourage the use of _doctests on all functions_. +- Write tests (especially [__doctests__](https://docs.python.org/3/library/doctest.html)) to illustrate and verify your work. We highly encourage the use of _doctests on all functions_. ```python def sum_ab(a, b): @@ -139,7 +134,7 @@ We want your work to be readable by others; therefore, we encourage you to note python3 -m doctest -v my_submission.py ``` - The use of the Python builtin `input()` function is **not** encouraged: + The use of the Python builtin `input()` function is __not__ encouraged: ```python input('Enter your input:') @@ -153,7 +148,7 @@ We want your work to be readable by others; therefore, we encourage you to note starting_value = int(input("Please enter a starting value: ").strip()) ``` - The use of [Python type hints](https://docs.python.org/3/library/typing.html) is encouraged for function parameters and return values. Our automated testing will run [mypy](http://mypy-lang.org) so run that locally before making your submission. + The use of [Python type hints](https://docs.python.org/3/library/typing.html) is encouraged for function parameters and return values. Our automated testing will run [mypy](http://mypy-lang.org) so run that locally before making your submission. ```python def sum_ab(a: int, b: int) -> int: @@ -162,27 +157,26 @@ We want your work to be readable by others; therefore, we encourage you to note Instructions on how to install mypy can be found [here](https://github.com/python/mypy). Please use the command `mypy --ignore-missing-imports .` to test all files or `mypy --ignore-missing-imports path/to/file.py` to test a specific file. -- [**List comprehensions and generators**](https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions) are preferred over the use of `lambda`, `map`, `filter`, `reduce` but the important thing is to demonstrate the power of Python in code that is easy to read and maintain. +- [__List comprehensions and generators__](https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions) are preferred over the use of `lambda`, `map`, `filter`, `reduce` but the important thing is to demonstrate the power of Python in code that is easy to read and maintain. - Avoid importing external libraries for basic algorithms. Only use those libraries for complicated algorithms. -- If you need a third-party module that is not in the file **requirements.txt**, please add it to that file as part of your submission. +- If you need a third-party module that is not in the file __requirements.txt__, please add it to that file as part of your submission. #### Other Requirements for Submissions - - If you are submitting code in the `project_euler/` directory, please also read [the dedicated Guideline](https://github.com/TheAlgorithms/Python/blob/master/project_euler/README.md) before contributing to our Project Euler library. - The file extension for code files should be `.py`. Jupyter Notebooks should be submitted to [TheAlgorithms/Jupyter](https://github.com/TheAlgorithms/Jupyter). - Strictly use snake_case (underscore_separated) in your file_name, as it will be easy to parse in future using scripts. - Please avoid creating new directories if at all possible. Try to fit your work into the existing directory structure. -- If possible, follow the standard _within_ the folder you are submitting to. +- If possible, follow the standard *within* the folder you are submitting to. - If you have modified/added code work, make sure the code compiles before submitting. - If you have modified/added documentation work, ensure your language is concise and contains no grammar errors. - Do not update the README.md or DIRECTORY.md file which will be periodically autogenerated by our GitHub Actions processes. - Add a corresponding explanation to [Algorithms-Explanation](https://github.com/TheAlgorithms/Algorithms-Explanation) (Optional but recommended). -- All submissions will be tested with [**mypy**](http://www.mypy-lang.org) so we encourage you to add [**Python type hints**](https://docs.python.org/3/library/typing.html) where it makes sense to do so. +- All submissions will be tested with [__mypy__](http://www.mypy-lang.org) so we encourage you to add [__Python type hints__](https://docs.python.org/3/library/typing.html) where it makes sense to do so. - Most importantly, - - **Be consistent in the use of these guidelines when submitting.** - - **Join** us on [Discord](https://discord.com/invite/c7MnfGFGa6) and [Gitter](https://gitter.im/TheAlgorithms) **now!** + - __Be consistent in the use of these guidelines when submitting.__ + - __Join__ us on [Discord](https://discord.com/invite/c7MnfGFGa6) and [Gitter](https://gitter.im/TheAlgorithms) __now!__ - Happy coding! Writer [@poyea](https://github.com/poyea), Jun 2019.