Package: seanalgorithms4
SEANLAB Algorithms4
Pythonic Data Structures and AlgorithmsMinimal and clean example implementations of data structures and algorithms in Python 3.ContributingThanks for your interest in contributing! There are many ways to contribute to this project.Get started hereTestsUse unittestFor running all tests write down:$ python3 -m unittest discover testsFor running some specific tests you can do this as following (Ex: sort):$ python3 -m unittest tests.test_sortUse pytestFor running all tests write down:$ python3 -m pytest testsInstallIf you want to use the API algorithms in your code, it is as simple as:$ pip3 install seanalgorithms4You can test by creating a python file: (Ex: usemerge_sortinsort)fromseanalgorithms4.sortimportmerge_sortif__name__=="__main__":my_list=[1,8,3,5,6]my_list=merge_sort(my_list)print(my_list)UninstallIf you want to uninstall seanalgorithms4, it is as simple as:$ pip3 uninstall -y seanalgorithms4algorithms4_practice1.bisection2.intersection3.lu_decomposition4.newton_methodin_static_equilibriumnewton_raphson_method1.all_combinations2.all_permutations3.all_subsequences4.minimax5.n_queens6.sudoku7.sum_of_subsetsquine_mc_cluskey_xaffine_cipheratbashbase16base32base64_cipherbase85brute_force_caesar_ciphercaesar_ciphercryptomath_moduleelgamal_key_generatorhill_ciphermorse_code_implementationonepad_cipherplayfair_cipherrabin_millerrot13rsa_cipherrsa_key_generatorsimple_substitution_ciphertrafid_ciphertransposition_ciphertransposition_cipher_encrypt_decrypt_filevigenere_cipherxor_cipherburrows_wheelerhuffmanpeak_signal_to_noise_ratio1.decimal_to_binary2.decimal_to_hexadecimal3.decimal_to_octal1.avl_tree2.basic_binary_tree3.binary_search_tree4.fenwick_tree5.lazy_segment_tree6.lca7.red_black_tree8.segment_treetreapdouble_hashhash_tablehash_table_with_linked_listquadratic_probing1.prime_numbersbinomial_heapheapdoubly_linked_listis_palindromesingly_linked_listswap_nodes1.double_ended_queuequeue_on_listqueue_on_pseudo_stack1.balanced_parentheses1.balanced_parentheses22.infix_to_postfix_conversion3.infix_to_prefix_conversion4.next_greater_element5.postfix_evaluation6.stock_span_problemstacktriechange_contrasttest_digital_image_processingcannyconvolvegaussian_filtermedian_filtersobel_filter1.closest_pair_of_points2.convex_hull3.inversions4.max_subarray_sum1.abbreviation10.k_means_clustering_tensorflow11.knapsack12.longest_common_subsequence13.longest_increasing_subsequence14.longest_increasing_subsequence_o(nlogn)15.longest_sub_array16.matrix_chain_order17.max_sub_array18.minimum_partition19.rod_cutting2.bitmask20.subset_generation21.sum_of_subset23.fibonacci24.floyd_warshall3.climbing_stairs4.coin_change5.edit_distance6.factorial7.fast_fibonacci8.fractional_knapsack9.integer_partitionfibonaccifloyd_warshallrecieve_filesend_file1.a_star10.depth_first_search11.dfs12.dijkstra13.dijkstra_214.dijkstra_algorithm15.edmonds_karp_multiple_source_and_sink16.eulerian_path_and_circuit_for_undirected_graph17.even_tree18.finding_bridges19.graph_list2.articulation_points20.graph_matrix21.graphs_floyd_warshall22.kahns_algorithm_long23.kahns_algorithm_topo24.minimum_spanning_tree_prims25.multi_hueristic_astar3.basic_graphs4.bellman_ford5.bfs6.bfs_shortest_path7.breadth_first_search8.check_bipartite_graph_bfs9.check_bipartite_graph_dfsdirected_and_undirected_(weighted)_graph_xminimum_spanning_tree_kruskal_xpage_rank_xprim_xscc_kosaraju_xtarjans_scc_xchaos_machineenigma_machinemd5sha1libpolynom-for-pointstestsdecision_treegradient_descentknn_sklearnk_means_clustlinear_regressionlogistic_regressionscoring_functionssorted_vector_machinesrandom_forest_classificationrandom_forest_regression3n+1absabs_maxabs_minaverage_meanaverage_medianbasic_mathsbinary_exponentiationcollatz_sequenceextended_euclidean_algorithmfactorial_pythonfactorial_recursivefermat_little_theoremfibonaccifibonacci_sequence_recursionfind_lcmfind_maxfind_mingaussiangreater_common_divisoris_square_freelargest_of_very_large_numberslucas_lehmer_primality_testlucas_seriesmobius_functionmodular_exponentialnewton_raphsonprime_checkprime_factorsquadratic_equations_complex_numbersradix2_fftsegmented_sievesieve_of_eratosthenessimpson_ruletesttest_prime_checktrapezoidal_rulevolumezellers_congruence1.matrix_operation2.nth_fibonacci_using_matrix_exponentiation3.rotate_matrix4.searching_in_sorted_matrix5.spiral_printsherman_morrison_xtest_matrix_operation1.ford_fulkerson2.minimum_cutback_propagation_neural_networkconvolution_neural_networkperceptronanagramsbinary_exponentiationbinary_exponentiation_2detecting_english_programmaticallyeuclidean_gcdfischer_yates_shufflefrequency_findergame_of_lifelinear_congruential_generatornested_bracketspalindromepassword_generatorprimelibsierpinski_triangletower_of_hanoitwo_sumword_patternssol1sol2sol3sol4sol5sol6sol1sol2sol3sol4sol1sol2sol1sol2sol1sol2sol1sol2sol3sol1sol2sol3sol1sol2sol1sol2sol3sol1sol2sol3sol1sol2sol1sol2sol1sol1sol2sol1sol1sol2sol1sol1sol1sol2sol1sol1sol2sol1sol1sol1sol2sol1solutionsol1sol1sol1sol1sol1sol1sol1sol1sol1build_directory_mdvalidate_filenames1.binary_search10.jump_search11.linear_search2.interpolation_search3.jump_search4.linear_search5.quick_select6.sentinel_linear_search7.ternary_search8.binary_search9.interpolation_searchbinary_searchlinear_searchquick_selectsentinel_linear_searchtabu_searchternary_search1.bitonic_sort10.heap_sort11.insertion_sort12.merge_sort13.merge_sort_fastest14.odd_even_transposition_parallel15.odd_even_transposition_single_threaded16.pancake_sort18.external_sort19.pancake_sort2.bogo_sort20.pigeon_sort21.quick_sort22.quick_sort_3_partition23.radix_sort24.random_pivot_quick_sort25.selection_sort26.shell_sort27.tim_sort28.topological_sort29.tree_sort3.bubble_sort30.wiggle_sort4.bucket_sort5.cocktail_shaker_sort6.comb_sort7.counting_sort8.cycle_sort9.gnome_sortbitonic_sortbogo_sortbubble_sortbucket_sortcocktail_shaker_sortcomb_sortcounting_sortcycle_sortexternal_sortgnome_sortheap_sortinsertion_sortmerge_sortmerge_sort_fastestodd_even_transposition_parallelodd_even_transposition_single_threadedpancake_sortquick_sortquick_sort_3_partitionradix_sortrandom_normal_distribution_quicksort_xrandom_pivot_quick_sortselection_sortshell_sorttim_sorttopological_sorttree_sortwiggle_sort1.boyer_moore_search2.knuth_morris_prattlevenshtein_distancemanachermin_cost_string_conversionnaive_string_searchrabin_karpbinary_tree_traversalsbisectionintersectionin_static_equilibriumlu_decompositionnewton_methodnewton_raphson_methodall_combinationsall_permutationsall_subsequencesminimaxn_queenssudokusum_of_subsetsquine_mc_cluskeyaffine_cipheratbashbase16base32base64_cipherbase85brute_force_caesar_ciphercaesar_ciphercryptomath_moduleelgamal_key_generatorhill_ciphermorse_code_implementationonepad_cipherplayfair_cipherrabin_millerrot13rsa_cipherrsa_key_generatorsimple_substitution_ciphertrafid_ciphertransposition_ciphertransposition_cipher_encrypt_decrypt_filevigenere_cipherxor_cipherburrows_wheelerhuffmanpeak_signal_to_noise_ratiodecimal_to_binarydecimal_to_hexadecimaldecimal_to_octalavl_treebasic_binary_treebinary_search_treefenwick_treelazy_segment_treelcared_black_treesegment_treetreapdouble_hashhash_tablehash_table_with_linked_listquadratic_probingprime_numbersbinomial_heapheapdoubly_linked_listis_palindromesingly_linked_listswap_nodesdouble_ended_queuequeue_on_listqueue_on_pseudo_stackbalanced_parenthesesinfix_to_postfix_conversioninfix_to_prefix_conversionnext_greater_elementpostfix_evaluationstackstock_span_problemtriechange_contrasttest_digital_image_processingcannyconvolvegaussian_filtermedian_filtersobel_filterclosest_pair_of_pointsconvex_hullinversionsmax_subarray_sumabbreviationbitmaskclimbing_stairscoin_changeedit_distancefactorialfast_fibonaccifibonaccifloyd_warshallfractional_knapsackinteger_partitionknapsackk_means_clustering_tensorflowlongest_common_subsequencelongest_increasing_subsequencelongest_increasing_subsequence_o(nlogn)longest_sub_arraymatrix_chain_ordermax_sub_arrayminimum_partitionrod_cuttingsubset_generationsum_of_subsetrecieve_filesend_filearticulation_pointsa_starbasic_graphsbellman_fordbfsbfs_shortest_pathbreadth_first_searchcheck_bipartite_graph_bfscheck_bipartite_graph_dfsdepth_first_searchdfsdijkstradijkstra_2dijkstra_algorithmdirected_and_undirected_(weighted)_graphedmonds_karp_multiple_source_and_sinkeulerian_path_and_circuit_for_undirected_grapheven_treefinding_bridgesgraphs_floyd_warshallgraph_listgraph_matrixkahns_algorithm_longkahns_algorithm_topominimum_spanning_tree_kruskalminimum_spanning_tree_primsmulti_hueristic_astarpage_rankprimscc_kosarajutarjans_sccchaos_machineenigma_machinemd5sha1libpolynom-for-pointstestsdecision_treegradient_descentknn_sklearnk_means_clustlinear_regressionlogistic_regressionscoring_functionssorted_vector_machinesrandom_forest_classificationrandom_forest_regression3n+1absabs_maxabs_minaverage_meanaverage_medianbasic_mathsbinary_exponentiationcollatz_sequenceextended_euclidean_algorithmfactorial_pythonfactorial_recursivefermat_little_theoremfibonaccifibonacci_sequence_recursionfind_lcmfind_maxfind_mingaussiangreater_common_divisoris_square_freelargest_of_very_large_numberslucas_lehmer_primality_testlucas_seriesmobius_functionmodular_exponentialnewton_raphsonprime_checkprime_factorsquadratic_equations_complex_numbersradix2_fftsegmented_sievesieve_of_eratosthenessimpson_ruletest_prime_checktrapezoidal_rulevolumezellers_congruencematrix_operationnth_fibonacci_using_matrix_exponentiationrotate_matrixsearching_in_sorted_matrixsherman_morrisonspiral_printtest_matrix_operationford_fulkersonminimum_cutback_propagation_neural_networkconvolution_neural_networkperceptronanagramsbinary_exponentiationbinary_exponentiation_2detecting_english_programmaticallyeuclidean_gcdfischer_yates_shufflefrequency_findergame_of_lifelinear_congruential_generatornested_bracketspalindromepassword_generatorprimelibsierpinski_triangletower_of_hanoitwo_sumword_patternssol1sol2sol3sol4sol5sol6sol1sol2sol3sol4sol1sol2sol1sol2sol1sol2sol1sol2sol3sol1sol2sol3sol1sol2sol1sol2sol3sol1sol2sol3sol1sol2sol1sol2sol1sol1sol2sol1sol1sol2sol1sol1sol1sol2sol1sol1sol2sol1sol1sol1sol2sol1solutionsol1sol1sol1sol1sol1sol1sol1sol1sol1build_directory_mdvalidate_filenamesbinary_searchinterpolation_searchjump_searchlinear_searchquick_selectsentinel_linear_searchtabu_searchternary_searchbitonic_sortbogo_sortbubble_sortbucket_sortcocktail_shaker_sortcomb_sortcounting_sortcycle_sortexternal_sortgnome_sortheap_sortinsertion_sortmerge_sortmerge_sort_fastestodd_even_transposition_parallelodd_even_transposition_single_threadedpancake_sortpigeon_sortquick_sortquick_sort_3_partitionradix_sortrandom_normal_distribution_quicksortrandom_pivot_quick_sortselection_sortshell_sorttim_sorttopological_sorttree_sortwiggle_sortboyer_moore_searchknuth_morris_prattlevenshtein_distancemanachermin_cost_string_conversionnaive_string_searchrabin_karpbinary_tree_traversalsArithmetic Analysisbisectionin static equilibriumintersectionlu decompositionnewton methodnewton raphson methodBacktrackingall combinationsall permutationsall subsequencesminimaxn queenssudokusum of subsetsBoolean Algebraquine mc cluskeyCiphersaffine cipheratbashbase16base32base64 cipherbase85brute force caesar ciphercaesar ciphercryptomath moduleelgamal key generatorhill ciphermorse code implementationonepad cipherplayfair cipherrabin millerrot13rsa cipherrsa key generatorsimple substitution ciphertrafid ciphertransposition ciphertransposition cipher encrypt decrypt filevigenere cipherxor cipherCompressionburrows wheelerhuffmanpeak signal to noise ratioConversionsdecimal to binarydecimal to hexadecimaldecimal to octalData StructuresBinary Treeavl treebasic binary treebinary search treefenwick treelazy segment treelcared black treesegment treetreapHashingdouble hashhash tablehash table with linked listNumber Theoryprime numbersquadratic probingHeapheapLinked Listdoubly linked listis palindromesingly linked listswap nodesQueuedouble ended queuequeue on listqueue on pseudo stackStacksbalanced parenthesesinfix to postfix conversioninfix to prefix conversionnext greater elementpostfix evaluationstackstock span problemTrietrieDigital Image Processing* [change contrast](https://github.com/TheAlgorithms/Python/blob/master/digital_image_processing/change_contrast.py)Edge DetectioncannyFiltersconvolvegaussian filtermedian filtersobel filtertest digital image processingDivide And Conquerclosest pair of pointsconvex hullinversionsmax subarray sumDynamic Programmingabbreviationbitmaskclimbing stairscoin changeedit distancefactorialfast fibonaccifibonaccifloyd warshallfractional knapsackinteger partitionk means clustering tensorflowknapsacklongest common subsequencelongest increasing subsequencelongest increasing subsequence o(nlogn)longest sub arraymatrix chain ordermax sub arrayminimum partitionrod cuttingsubset generationsum of subsetFile Transferrecieve filesend fileGraphsa stararticulation pointsbasic graphsbellman fordbfsbfs shortest pathbreadth first searchcheck bipartite graph bfscheck bipartite graph dfsdepth first searchdfsdijkstradijkstra 2dijkstra algorithmdirected and undirected (weighted) graphedmonds karp multiple source and sinkeulerian path and circuit for undirected grapheven treefinding bridgesgraph listgraph matrixgraphs floyd warshallkahns algorithm longkahns algorithm topominimum spanning tree kruskalminimum spanning tree primsmulti hueristic astarpage rankprimscc kosarajutarjans sccHasheschaos machineenigma machinemd5sha1Linear AlgebraSrclibpolynom-for-pointstestsMachine Learningdecision treegradient descentk means clustknn sklearnlinear regressionlogistic regressionnaive bayesRandom Forest Classificationrandom forest classificationrandom forest classifierRandom Forest Regressionrandom forest regressionrandom forest regressionreuters one vs rest classifierscoring functionssorted vector machinesMaths3n+1absabs maxabs minaverage meanaverage medianbasic mathsbinary exponentiationcollatz sequenceextended euclidean algorithmfactorial pythonfactorial recursivefermat little theoremfibonaccifibonacci sequence recursionfind lcmfind maxfind mingaussiangreater common divisoris square freelargest of very large numberslucas lehmer primality testlucas seriesmobius functionmodular exponentialnewton raphsonprime checkprime factorsquadratic equations complex numberssegmented sievesieve of eratosthenessimpson ruletest prime checktrapezoidal rulevolumezellers congruenceMatrixmatrix operationnth fibonacci using matrix exponentiationrotate matrixsearching in sorted matrixspiral printTeststest matrix operationNetworking Flowford fulkersonminimum cutNeural Networkback propagation neural networkconvolution neural networkfully connected neural networkperceptronOtheranagramsbinary exponentiationbinary exponentiation 2detecting english programmaticallyeuclidean gcdfischer yates shufflefood wastage analysis from 1961-2013 faofrequency findergame of lifelinear congruential generatornested bracketspalindromepassword generatorprimelibsierpinski triangletower of hanoitwo sumword patternsProject EulerProblem 01sol1sol2sol3sol4sol5sol6Problem 02sol1sol2sol3sol4Problem 03sol1sol2Problem 04sol1sol2Problem 05sol1sol2Problem 06sol1sol2sol3Problem 07sol1sol2sol3Problem 08sol1sol2Problem 09sol1sol2sol3Problem 10sol1sol2sol3Problem 11sol1sol2Problem 12sol1sol2Problem 13sol1Problem 14sol1sol2Problem 15sol1Problem 16sol1sol2Problem 17sol1Problem 18sol1Problem 19sol1Problem 20sol1sol2Problem 21sol1Problem 22sol1sol2Problem 234sol1Problem 24sol1Problem 25sol1sol2Problem 28sol1Problem 29solutionProblem 31sol1Problem 36sol1Problem 40sol1Problem 48sol1Problem 52sol1Problem 53sol1Problem 56sol1Problem 76sol1Searchesbinary searchinterpolation searchjump searchlinear searchquick selectsentinel linear searchtabu searchternary searchSortsbitonic sortbogo sortbubble sortbucket sortcocktail shaker sortcomb sortcounting sortcycle sortexternal sortgnome sortheap sortinsertion sortmerge sortmerge sort fastestodd even transposition parallelodd even transposition single threadedpancake sortpigeon sortquick sortquick sort 3 partitionradix sortrandom normal distribution quicksortrandom pivot quick sortselection sortshell sorttim sorttopological sorttree sortwiggle sortStringsboyer moore searchknuth morris prattlevenshtein distancemanachermin cost string conversionnaive string searchrabin karpTraversalsbinary tree traversals