Rust-master.zip
大小:423.29KB
价格:30积分
下载量:0
评分:
5.0
上传者:2301_80488214
更新日期:2025-09-22

所有算法均用 Rust 实现

资源文件列表(大概)

文件名
大小
Rust-master/
-
Rust-master/.gitconfig
33B
Rust-master/.github/
-
Rust-master/.github/CODEOWNERS
18B
Rust-master/.github/dependabot.yml
233B
Rust-master/.github/pull_request_template.md
1.47KB
Rust-master/.github/workflows/
-
Rust-master/.github/workflows/build.yml
595B
Rust-master/.github/workflows/directory_workflow.yml
890B
Rust-master/.github/workflows/scripts/
-
Rust-master/.github/workflows/scripts/build_directory/
-
Rust-master/.github/workflows/scripts/build_directory/Cargo.toml
184B
Rust-master/.github/workflows/scripts/build_directory/src/
-
Rust-master/.github/workflows/scripts/build_directory/src/lib.rs
3.96KB
Rust-master/.github/workflows/scripts/build_directory/src/main.rs
504B
Rust-master/.github/workflows/stale.yml
1.3KB
Rust-master/.github/workflows/upload_coverage_report.yml
1.15KB
Rust-master/.gitignore
67B
Rust-master/.gitpod.Dockerfile
60B
Rust-master/.gitpod.yml
125B
Rust-master/CONTRIBUTING.md
866B
Rust-master/Cargo.toml
8.08KB
Rust-master/DIRECTORY.md
32.12KB
Rust-master/LICENSE
1.05KB
Rust-master/README.md
1.55KB
Rust-master/git_hooks/
-
Rust-master/git_hooks/pre-commit
21B
Rust-master/src/
-
Rust-master/src/backtracking/
-
Rust-master/src/backtracking/all_combination_of_size_k.rs
1.46KB
Rust-master/src/backtracking/graph_coloring.rs
12.51KB
Rust-master/src/backtracking/hamiltonian_cycle.rs
10.51KB
Rust-master/src/backtracking/knight_tour.rs
5.94KB
Rust-master/src/backtracking/mod.rs
623B
Rust-master/src/backtracking/n_queens.rs
6.25KB
Rust-master/src/backtracking/parentheses_generator.rs
2.61KB
Rust-master/src/backtracking/permutations.rs
2.2KB
Rust-master/src/backtracking/rat_in_maze.rs
11.92KB
Rust-master/src/backtracking/subset_sum.rs
2.23KB
Rust-master/src/backtracking/sudoku.rs
5.2KB
Rust-master/src/big_integer/
-
Rust-master/src/big_integer/fast_factorial.rs
2.82KB
Rust-master/src/big_integer/mod.rs
194B
Rust-master/src/big_integer/multiply.rs
2.31KB
Rust-master/src/big_integer/poly1305.rs
2.78KB
Rust-master/src/bit_manipulation/
-
Rust-master/src/bit_manipulation/counting_bits.rs
1.19KB
Rust-master/src/bit_manipulation/highest_set_bit.rs
1.02KB
Rust-master/src/bit_manipulation/mod.rs
199B
Rust-master/src/bit_manipulation/sum_of_two_integers.rs
1.31KB
Rust-master/src/ciphers/
-
Rust-master/src/ciphers/README.md
4.42KB
Rust-master/src/ciphers/aes.rs
27.5KB
Rust-master/src/ciphers/another_rot13.rs
935B
Rust-master/src/ciphers/baconian_cipher.rs
2.27KB
Rust-master/src/ciphers/base64.rs
9.31KB
Rust-master/src/ciphers/blake2b.rs
10.01KB
Rust-master/src/ciphers/caesar.rs
4.11KB
Rust-master/src/ciphers/chacha.rs
5.62KB
Rust-master/src/ciphers/diffie_hellman.rs
14.73KB
Rust-master/src/ciphers/hashing_traits.rs
3.16KB
Rust-master/src/ciphers/kerninghan.rs
486B
Rust-master/src/ciphers/mod.rs
1.28KB
Rust-master/src/ciphers/morse_code.rs
5.98KB
Rust-master/src/ciphers/polybius.rs
3.62KB
Rust-master/src/ciphers/rail_fence.rs
1.17KB
Rust-master/src/ciphers/rot13.rs
692B
Rust-master/src/ciphers/salsa.rs
4.62KB
Rust-master/src/ciphers/sha256.rs
11.26KB
Rust-master/src/ciphers/sha3.rs
21.53KB
Rust-master/src/ciphers/tea.rs
3.68KB
Rust-master/src/ciphers/theoretical_rot13.rs
1012B
Rust-master/src/ciphers/transposition.rs
8.76KB
Rust-master/src/ciphers/vigenere.rs
2.23KB
Rust-master/src/ciphers/xor.rs
1.43KB
Rust-master/src/compression/
-
Rust-master/src/compression/mod.rs
101B
Rust-master/src/compression/run_length_encoding.rs
1.79KB
Rust-master/src/conversions/
-
Rust-master/src/conversions/binary_to_decimal.rs
2.9KB
Rust-master/src/conversions/binary_to_hexadecimal.rs
2.52KB
Rust-master/src/conversions/decimal_to_binary.rs
562B
Rust-master/src/conversions/decimal_to_hexadecimal.rs
1.15KB
Rust-master/src/conversions/hexadecimal_to_binary.rs
1.9KB
Rust-master/src/conversions/hexadecimal_to_decimal.rs
1.84KB
Rust-master/src/conversions/mod.rs
645B
Rust-master/src/conversions/octal_to_binary.rs
1.44KB
Rust-master/src/conversions/octal_to_decimal.rs
1.45KB
Rust-master/src/data_structures/
-
Rust-master/src/data_structures/README.md
3.38KB
Rust-master/src/data_structures/avl_tree.rs
10.33KB
Rust-master/src/data_structures/b_tree.rs
5.67KB
Rust-master/src/data_structures/binary_search_tree.rs
10.38KB
Rust-master/src/data_structures/fenwick_tree.rs
2KB
Rust-master/src/data_structures/floyds_algorithm.rs
2.71KB
Rust-master/src/data_structures/graph.rs
5.93KB
Rust-master/src/data_structures/hash_table.rs
3.62KB
Rust-master/src/data_structures/heap.rs
5.16KB
Rust-master/src/data_structures/lazy_segment_tree.rs
10.8KB
Rust-master/src/data_structures/linked_list.rs
14.69KB
Rust-master/src/data_structures/mod.rs
1.35KB
Rust-master/src/data_structures/postfix_evaluation.rs
2.46KB
Rust-master/src/data_structures/probabilistic/
-
Rust-master/src/data_structures/probabilistic/bloom_filter.rs
11.22KB
Rust-master/src/data_structures/probabilistic/count_min_sketch.rs
9.68KB
Rust-master/src/data_structures/probabilistic/mod.rs
48B
Rust-master/src/data_structures/queue.rs
2.16KB
Rust-master/src/data_structures/range_minimum_query.rs
4.34KB
Rust-master/src/data_structures/rb_tree.rs
19.35KB
Rust-master/src/data_structures/segment_tree.rs
7.39KB
Rust-master/src/data_structures/segment_tree_recursive.rs
7.54KB
Rust-master/src/data_structures/stack_using_singly_linked_list.rs
7.35KB
Rust-master/src/data_structures/treap.rs
9.4KB
Rust-master/src/data_structures/trie.rs
2.22KB
Rust-master/src/data_structures/union_find.rs
7.61KB
Rust-master/src/data_structures/veb_tree.rs
10.05KB
Rust-master/src/dynamic_programming/
-
Rust-master/src/dynamic_programming/coin_change.rs
4.12KB
Rust-master/src/dynamic_programming/egg_dropping.rs
2.11KB
Rust-master/src/dynamic_programming/fibonacci.rs
14.84KB
Rust-master/src/dynamic_programming/fractional_knapsack.rs
2.79KB
Rust-master/src/dynamic_programming/is_subsequence.rs
895B
Rust-master/src/dynamic_programming/knapsack.rs
12.13KB
Rust-master/src/dynamic_programming/longest_common_subsequence.rs
4.76KB
Rust-master/src/dynamic_programming/longest_common_substring.rs
1.7KB
Rust-master/src/dynamic_programming/longest_continuous_increasing_subsequence.rs
2.11KB
Rust-master/src/dynamic_programming/longest_increasing_subsequence.rs
3.33KB
Rust-master/src/dynamic_programming/matrix_chain_multiply.rs
3.22KB
Rust-master/src/dynamic_programming/maximal_square.rs
1.64KB
Rust-master/src/dynamic_programming/maximum_subarray.rs
1.47KB
Rust-master/src/dynamic_programming/minimum_cost_path.rs
2.09KB
Rust-master/src/dynamic_programming/mod.rs
1.72KB
Rust-master/src/dynamic_programming/rod_cutting.rs
2.42KB
Rust-master/src/dynamic_programming/snail.rs
3.68KB
Rust-master/src/dynamic_programming/subset_generation.rs
2.74KB
Rust-master/src/dynamic_programming/trapped_rainwater.rs
3.56KB
Rust-master/src/dynamic_programming/word_break.rs
2.2KB
Rust-master/src/general/
-
Rust-master/src/general/convex_hull.rs
4.82KB
Rust-master/src/general/fisher_yates_shuffle.rs
622B
Rust-master/src/general/genetic.rs
17.15KB
Rust-master/src/general/hanoi.rs
594B
Rust-master/src/general/huffman_encoding.rs
6.91KB
Rust-master/src/general/kadane_algorithm.rs
2.17KB
Rust-master/src/general/kmeans.rs
6.53KB
Rust-master/src/general/mex.rs
2.2KB
Rust-master/src/general/mod.rs
765B
Rust-master/src/general/permutations/
-
Rust-master/src/general/permutations/heap.rs
2.13KB
Rust-master/src/general/permutations/mod.rs
3KB
Rust-master/src/general/permutations/naive.rs
4.88KB
Rust-master/src/general/permutations/steinhaus_johnson_trotter.rs
1.85KB
Rust-master/src/general/two_sum.rs
2.05KB
Rust-master/src/geometry/
-
Rust-master/src/geometry/closest_points.rs
6.65KB
Rust-master/src/geometry/graham_scan.rs
6.73KB
Rust-master/src/geometry/jarvis_scan.rs
6.09KB
Rust-master/src/geometry/mod.rs
419B
Rust-master/src/geometry/point.rs
858B
Rust-master/src/geometry/polygon_points.rs
1.77KB
Rust-master/src/geometry/ramer_douglas_peucker.rs
3.33KB
Rust-master/src/geometry/segment.rs
6.35KB
Rust-master/src/graph/
-
Rust-master/src/graph/astar.rs
7.97KB
Rust-master/src/graph/bellman_ford.rs
9.02KB
Rust-master/src/graph/bipartite_matching.rs
7.87KB
Rust-master/src/graph/breadth_first_search.rs
4.82KB
Rust-master/src/graph/centroid_decomposition.rs
5.42KB
Rust-master/src/graph/decremental_connectivity.rs
8.55KB
Rust-master/src/graph/depth_first_search.rs
4.81KB
Rust-master/src/graph/depth_first_search_tic_tac_toe.rs
12.83KB
Rust-master/src/graph/detect_cycle.rs
9.94KB
Rust-master/src/graph/dijkstra.rs
5.08KB
Rust-master/src/graph/dinic_maxflow.rs
6.12KB
Rust-master/src/graph/disjoint_set_union.rs
2.55KB
Rust-master/src/graph/eulerian_path.rs
5.5KB
Rust-master/src/graph/floyd_warshall.rs
6.17KB
Rust-master/src/graph/ford_fulkerson.rs
8.9KB
Rust-master/src/graph/graph_enumeration.rs
1.98KB
Rust-master/src/graph/heavy_light_decomposition.rs
6.17KB
Rust-master/src/graph/kosaraju.rs
4.09KB
Rust-master/src/graph/lee_breadth_first_search.rs
3.39KB
Rust-master/src/graph/lowest_common_ancestor.rs
6.98KB
Rust-master/src/graph/minimum_spanning_tree.rs
3.71KB
Rust-master/src/graph/mod.rs
1.95KB
Rust-master/src/graph/prim.rs
5.6KB
Rust-master/src/graph/prufer_code.rs
3.87KB
Rust-master/src/graph/strongly_connected_components.rs
4.88KB
Rust-master/src/graph/tarjans_ssc.rs
4.25KB
Rust-master/src/graph/topological_sort.rs
4.49KB
Rust-master/src/graph/two_satisfiability.rs
3.65KB
Rust-master/src/lib.rs
799B
Rust-master/src/machine_learning/
-
Rust-master/src/machine_learning/cholesky.rs
3.04KB
Rust-master/src/machine_learning/k_means.rs
2.38KB
Rust-master/src/machine_learning/linear_regression.rs
1.45KB
Rust-master/src/machine_learning/loss_function/
-
Rust-master/src/machine_learning/loss_function/average_margin_ranking_loss.rs
3.94KB
Rust-master/src/machine_learning/loss_function/hinge_loss.rs
1.04KB
Rust-master/src/machine_learning/loss_function/huber_loss.rs
1.97KB
Rust-master/src/machine_learning/loss_function/kl_divergence_loss.rs
1.24KB
Rust-master/src/machine_learning/loss_function/mean_absolute_error_loss.rs
1.07KB
Rust-master/src/machine_learning/loss_function/mean_squared_error_loss.rs
1.02KB
Rust-master/src/machine_learning/loss_function/mod.rs
526B
Rust-master/src/machine_learning/loss_function/negative_log_likelihood.rs
3.79KB
Rust-master/src/machine_learning/mod.rs
590B
Rust-master/src/machine_learning/optimization/
-
Rust-master/src/machine_learning/optimization/adam.rs
9.67KB
Rust-master/src/machine_learning/optimization/gradient_descent.rs
2.8KB
Rust-master/src/machine_learning/optimization/mod.rs
109B
Rust-master/src/math/
-
Rust-master/src/math/abs.rs
780B
Rust-master/src/math/aliquot_sum.rs
1.41KB
Rust-master/src/math/amicable_numbers.rs
1.97KB
Rust-master/src/math/area_of_polygon.rs
2.23KB
Rust-master/src/math/area_under_curve.rs
1.22KB
Rust-master/src/math/armstrong_number.rs
976B
Rust-master/src/math/average.rs
3.95KB
Rust-master/src/math/baby_step_giant_step.rs
2.5KB
Rust-master/src/math/bell_numbers.rs
3.79KB
Rust-master/src/math/binary_exponentiation.rs
1.59KB
Rust-master/src/math/binomial_coefficient.rs
1.66KB
Rust-master/src/math/catalan_numbers.rs
1.69KB
Rust-master/src/math/ceil.rs
1.24KB
Rust-master/src/math/chinese_remainder_theorem.rs
951B
Rust-master/src/math/collatz_sequence.rs
768B
Rust-master/src/math/combinations.rs
1.16KB
Rust-master/src/math/cross_entropy_loss.rs
1.51KB
Rust-master/src/math/decimal_to_fraction.rs
1.93KB
Rust-master/src/math/doomsday.rs
952B
Rust-master/src/math/elliptic_curve.rs
11.88KB
Rust-master/src/math/euclidean_distance.rs
1.16KB
Rust-master/src/math/exponential_linear_unit.rs
1.88KB
Rust-master/src/math/extended_euclidean_algorithm.rs
1.15KB
Rust-master/src/math/factorial.rs
1.86KB
Rust-master/src/math/factors.rs
1.1KB
Rust-master/src/math/fast_fourier_transform.rs
6.45KB
Rust-master/src/math/fast_power.rs
727B
Rust-master/src/math/faster_perfect_numbers.rs
1.23KB
Rust-master/src/math/field.rs
8.34KB
Rust-master/src/math/frizzy_number.rs
1.73KB
Rust-master/src/math/gaussian_elimination.rs
2.32KB
Rust-master/src/math/gaussian_error_linear_unit.rs
1.95KB
Rust-master/src/math/gcd_of_n_numbers.rs
657B
Rust-master/src/math/geometric_series.rs
1.42KB
Rust-master/src/math/greatest_common_divisor.rs
4.36KB
Rust-master/src/math/huber_loss.rs
1.9KB
Rust-master/src/math/infix_to_postfix.rs
3.04KB
Rust-master/src/math/interest.rs
1.99KB
Rust-master/src/math/interpolation.rs
3.03KB
Rust-master/src/math/interquartile_range.rs
2.61KB
Rust-master/src/math/karatsuba_multiplication.rs
1.77KB
Rust-master/src/math/lcm_of_n_numbers.rs
671B
Rust-master/src/math/leaky_relu.rs
1.42KB
Rust-master/src/math/least_square_approx.rs
3.15KB
Rust-master/src/math/linear_sieve.rs
4.02KB
Rust-master/src/math/logarithm.rs
2.14KB
Rust-master/src/math/lucas_series.rs
1.37KB
Rust-master/src/math/matrix_ops.rs
13.09KB
Rust-master/src/math/mersenne_primes.rs
928B
Rust-master/src/math/miller_rabin.rs
8.5KB
Rust-master/src/math/mod.rs
6.37KB
Rust-master/src/math/modular_exponential.rs
4.48KB
Rust-master/src/math/newton_raphson.rs
626B
Rust-master/src/math/nthprime.rs
1.26KB
Rust-master/src/math/pascal_triangle.rs
1.24KB
Rust-master/src/math/perfect_cube.rs
1.89KB
Rust-master/src/math/perfect_numbers.rs
1.1KB
Rust-master/src/math/perfect_square.rs
1.44KB
Rust-master/src/math/pollard_rho.rs
8.6KB
Rust-master/src/math/prime_check.rs
696B
Rust-master/src/math/prime_factors.rs
869B
Rust-master/src/math/prime_numbers.rs
886B
Rust-master/src/math/quadratic_residue.rs
7.64KB
Rust-master/src/math/random.rs
4.25KB
Rust-master/src/math/relu.rs
1.09KB
Rust-master/src/math/sieve_of_eratosthenes.rs
4.02KB
Rust-master/src/math/sigmoid.rs
1.08KB
Rust-master/src/math/signum.rs
788B
Rust-master/src/math/simpsons_integration.rs
3.67KB
Rust-master/src/math/softmax.rs
1.47KB
Rust-master/src/math/sprague_grundy_theorem.rs
2.24KB
Rust-master/src/math/square_pyramidal_numbers.rs
463B
Rust-master/src/math/square_root.rs
1.63KB
Rust-master/src/math/sum_of_digits.rs
3.06KB
Rust-master/src/math/sum_of_geometric_progression.rs
1.18KB
Rust-master/src/math/sum_of_harmonic_series.rs
1.32KB
Rust-master/src/math/sylvester_sequence.rs
875B
Rust-master/src/math/tanh.rs
1.12KB
Rust-master/src/math/trapezoidal_integration.rs
1.3KB
Rust-master/src/math/trial_division.rs
1.34KB
Rust-master/src/math/trig_functions.rs
7.8KB
Rust-master/src/math/vector_cross_product.rs
3.13KB
Rust-master/src/math/zellers_congruence_algorithm.rs
1.44KB
Rust-master/src/navigation/
-
Rust-master/src/navigation/bearing.rs
884B
Rust-master/src/navigation/haversine.rs
839B
Rust-master/src/navigation/mod.rs
97B
Rust-master/src/number_theory/
-
Rust-master/src/number_theory/compute_totient.rs
1.25KB
Rust-master/src/number_theory/kth_factor.rs
797B
Rust-master/src/number_theory/mod.rs
124B
Rust-master/src/searching/
-
Rust-master/src/searching/README.md
3.99KB
Rust-master/src/searching/binary_search.rs
5.64KB
Rust-master/src/searching/binary_search_recursive.rs
4.34KB
Rust-master/src/searching/exponential_search.rs
1.63KB
Rust-master/src/searching/fibonacci_search.rs
1.89KB
Rust-master/src/searching/interpolation_search.rs
1.63KB
Rust-master/src/searching/jump_search.rs
1.37KB
Rust-master/src/searching/kth_smallest.rs
1.8KB
Rust-master/src/searching/kth_smallest_heap.rs
2.52KB
Rust-master/src/searching/linear_search.rs
1.06KB
Rust-master/src/searching/mod.rs
1.29KB
Rust-master/src/searching/moore_voting.rs
1.94KB
Rust-master/src/searching/quick_select.rs
1.47KB
Rust-master/src/searching/saddleback_search.rs
3.07KB
Rust-master/src/searching/ternary_search.rs
2.19KB
Rust-master/src/searching/ternary_search_min_max.rs
2.64KB
Rust-master/src/searching/ternary_search_min_max_recursive.rs
2.92KB
Rust-master/src/searching/ternary_search_recursive.rs
2.26KB
Rust-master/src/sorting/
-
Rust-master/src/sorting/README.md
15.85KB
Rust-master/src/sorting/bead_sort.rs
1.35KB
Rust-master/src/sorting/binary_insertion_sort.rs
1.23KB
Rust-master/src/sorting/bingo_sort.rs
2.53KB
Rust-master/src/sorting/bitonic_sort.rs
1.64KB
Rust-master/src/sorting/bogo_sort.rs
1.65KB
Rust-master/src/sorting/bubble_sort.rs
1.17KB
Rust-master/src/sorting/bucket_sort.rs
2.16KB
Rust-master/src/sorting/cocktail_shaker_sort.rs
1.65KB
Rust-master/src/sorting/comb_sort.rs
1.29KB
Rust-master/src/sorting/counting_sort.rs
2.53KB
Rust-master/src/sorting/cycle_sort.rs
1.78KB
Rust-master/src/sorting/dutch_national_flag_sort.rs
1.78KB
Rust-master/src/sorting/exchange_sort.rs
1.23KB
Rust-master/src/sorting/gnome_sort.rs
1.6KB
Rust-master/src/sorting/heap_sort.rs
3.52KB
Rust-master/src/sorting/insertion_sort.rs
1.92KB
Rust-master/src/sorting/intro_sort.rs
2.61KB
Rust-master/src/sorting/merge_sort.rs
5.29KB
Rust-master/src/sorting/mod.rs
3.33KB
Rust-master/src/sorting/odd_even_sort.rs
1.51KB
Rust-master/src/sorting/pancake_sort.rs
1.29KB
Rust-master/src/sorting/patience_sort.rs
2.12KB
Rust-master/src/sorting/pigeonhole_sort.rs
1.27KB
Rust-master/src/sorting/quick_sort.rs
3.45KB
Rust-master/src/sorting/quick_sort_3_ways.rs
3.99KB
Rust-master/src/sorting/radix_sort.rs
1.99KB
Rust-master/src/sorting/selection_sort.rs
1.28KB
Rust-master/src/sorting/shell_sort.rs
1.85KB
Rust-master/src/sorting/sleep_sort.rs
1.45KB
Rust-master/src/sorting/sort_utils.rs
1.36KB
Rust-master/src/sorting/stooge_sort.rs
1.45KB
Rust-master/src/sorting/tim_sort.rs
4.9KB
Rust-master/src/sorting/tree_sort.rs
2.95KB
Rust-master/src/sorting/wave_sort.rs
1.81KB
Rust-master/src/sorting/wiggle_sort.rs
2.1KB
Rust-master/src/string/
-
Rust-master/src/string/README.md
3.53KB
Rust-master/src/string/aho_corasick.rs
4.02KB
Rust-master/src/string/anagram.rs
710B
Rust-master/src/string/autocomplete_using_trie.rs
2.73KB
Rust-master/src/string/boyer_moore_search.rs
1.98KB
Rust-master/src/string/burrows_wheeler_transform.rs
3.21KB
Rust-master/src/string/duval_algorithm.rs
1.75KB
Rust-master/src/string/hamming_distance.rs
1.15KB
Rust-master/src/string/isomorphism.rs
2.54KB
Rust-master/src/string/jaro_winkler_distance.rs
2.79KB
Rust-master/src/string/knuth_morris_pratt.rs
2.07KB
Rust-master/src/string/levenshtein_distance.rs
6.39KB
Rust-master/src/string/lipogram.rs
3.21KB
Rust-master/src/string/manacher.rs
3.5KB
Rust-master/src/string/mod.rs
1.72KB
Rust-master/src/string/palindrome.rs
553B
Rust-master/src/string/pangram.rs
2.6KB
Rust-master/src/string/rabin_karp.rs
3.22KB
Rust-master/src/string/reverse.rs
418B
Rust-master/src/string/run_length_encoding.rs
2.42KB
Rust-master/src/string/shortest_palindrome.rs
2.29KB
Rust-master/src/string/suffix_array.rs
2.56KB
Rust-master/src/string/suffix_array_manber_myers.rs
2.94KB
Rust-master/src/string/suffix_tree.rs
4.31KB
Rust-master/src/string/z_algorithm.rs
3.05KB

资源内容介绍

项目结构该项目组织如下:src/my_algo_category/mod.rsmy_algorithm.rssome_other_algorithm.rssome_other_algo_category/...mod.rs包含导出:mod my_algorithm;pub use self::my_algorithm::my_algorithm;my_algorithm.rs包含您的算法和相关测试:pub fn my_algorithm() { // ...}#[cfg(test)]mod tests { #[test] fn my_test() { // ... }}
## Sort Algorithms### [Bogo-sort](./bogo_sort.rs)![alt text][bogo-image]From [Wikipedia][bogo-wiki]: In computer science, bogosort is a sorting algorithm based on the generate and test paradigm. The function successively generates permutations of its input until it finds one that is sorted. It is not considered useful for sorting, but may be used for educational purposes, to contrast it with more efficient algorithms.__Properties__* Worst case performance (unbounded in randomized version)* Best case performance O(n)* Average case performance O((n+1)!)### [Bubble](./bubble_sort.rs)![alt text][bubble-image]From [Wikipedia][bubble-wiki]: Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted.__Properties__* Worst case performanceO(n^2)* Best case performanceO(n)* Average case performanceO(n^2)###### View the algorithm in [action][bubble-toptal]### [Cocktail-Shaker](./cocktail_shaker_sort.rs)![alt text][shaker-image]From [Wikipedia][shaker-wiki]: Cocktail shaker sort, also known as bidirectional bubble sort, cocktail sort, shaker sort (which can also refer to a variant of selection sort), ripple sort, shuffle sort, or shuttle sort, is an extension of bubble sort. The algorithm extends bubble sort by operating in two directions. While it improves on bubble sort by more quickly moving items to the beginning of the list, it provides only marginal performance improvements.__Properties__* Worst case performanceO(n^2)* Best case performanceO(n)* Average case performanceO(n^2)### [Comb-sort](./comb_sort.rs)![comb sort][comb-sort]From [wikipedia][comb-sort-wiki]: Comb sort is a relatively simple sorting algorithm and improves on bubble sort in the same way that shell sort improves on insertion sort. The basic idea of comb sort is that the gap(distance from two compared elements) can be much more than 1. And the inner loop of bubble sort, which does actual `swap`, is modified such that the gap between swapped elements goes down in steps of a `shrink factor k: [n/k, n/k^2, ..., 1]`. And the gap is divided by the shrink factor in every loop, and the process repeats until the gap is 1. At this point, comb sort continues using a gap of 1 until the list is fully sorted. The final stage of the sort is thus equivalent to a bubble sort, but this time most turtles have been dealt with, so a bubble sort will be efficient. And the shrink factor has a great effect on the efficiency of comb sort and `k=1.3` has been suggested as an ideal value.__Properties__* Worst case performance O(n^2)* Best case performance O(n log n)* Average case performance O(n^2/2^p)where `p` is the number of increments.### [Counting](./counting_sort.rs)From [Wikipedia][counting-wiki]: In computer science, counting sort is an algorithm for sorting a collection of objects according to keys that are small integers; that is, it is an integer sorting algorithm. It operates by counting the number of objects that have each distinct key value, and using arithmetic on those counts to determine the positions of each key value in the output sequence. Its running time is linear in the number of items and the difference between the maximum and minimum key values, so it is only suitable for direct use in situations where the variation in keys is not significantly greater than the number of items. However, it is often used as a subroutine in another sorting algorithm, radix sort, that can handle larger keys more efficiently.__Properties__* Worst case performanceO(n+k)* Best case performanceO(n+k)* Average case performanceO(n+k),where n is the number of integers to sort and k is the difference between the largest and smallest integer in our list.### [Insertion](./insertion_sort.rs)![alt text][insertion-image]From [Wikipedia][insertion-wiki]: Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort.__Properties__* Worst case performanceO(n^2)* Best case performanceO(n)* Average case performanceO(n^2)###### View the algorithm in [action][insertion-toptal]### [Gnome](./gnome_sort.rs)![alt text][gnome-image]From [Wikipedia][gnome-wiki]: The gnome sort is a sorting algorithm which is similar to insertion sort in that it works with one item at a time but gets the item to the proper place by a series of swaps, similar to a bubble sort. It is conceptually simple, requiring no nested loops. The average running time is O(n^2) but tends towards O(n) if the list is initially almost sorted__Properties__* Worst case performanceO(n^2)* Best case performanceO(n)* Average case performanceO(n^2)### [Merge](./merge_sort.rs)![alt text][merge-image]From [Wikipedia][merge-wiki]: In computer science, merge sort (also commonly spelled mergesort) is an efficient, general-purpose, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output. Mergesort is a divide and conquer algorithm that was invented by John von Neumann in 1945.__Properties__* Worst case performanceO(n log n)* Best case performanceO(n log n)* Average case performanceO(n log n)###### View the algorithm in [action][merge-toptal]### [Odd-even](./odd_even_sort.rs)![alt text][odd-even-image]From [Wikipedia][odd-even-wiki]: In computing, an odd–even sort or odd–even transposition sort (also known as brick sort or parity sort) is a relatively simple sorting algorithm, developed originally for use on parallel processors with local interconnections. It is a comparison sort related to bubble sort, with which it shares many characteristics. It functions by comparing all odd/even indexed pairs of adjacent elements in the list and, if a pair is in the wrong order (the first is larger than the second) the elements are switched. The next step repeats this for even/odd indexed pairs (of adjacent elements). Then it alternates between odd/even and even/odd steps until the list is sorted. NOTE: The implementation is an adaptation of the algorithm for a single-processor machine, while the original algorithm was devised to be executed on many processors simultaneously.__Properties__* Worst case performanceO(n^2)* Best case performanceO(n)* Average case performanceO(n^2)### [Pancake](./pancake_sort.rs)![alt text][pancake-image]From [Wikipedia][pancake-wiki]: All sorting methods require pairs of elements to be compared. For the traditional sorting problem, the usual problem studied is to minimize the number of comparisons required to sort a list. The number of actual operations, such as swapping two elements, is then irrelevant. For pancake sorting problems, in contrast, the aim is to minimize the number of operations, where the only allowed operations are reversals of the elements of some prefix of the sequence. Now, the number of comparisons is irrelevant.### [Quick](./quick_sort.rs)![alt text][quick-image]From [Wikipedia][quick-wiki]: Quicksort (sometimes called partition-exchange sort) is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order.__Properties__* Worst case performanceO(n^2)* Best case performanceO(n log n) or O(n) with three-way partition* Average case performanceO(n log n)###### View the algorithm in [action][quick-toptal]### [Radix](./radix_sort.rs)![alt text][radix-image]From [Wikipedia][radix-wiki]: Radix sort is a non-comparative sorting algorithm. It avoids comparison by creating and distributing elements i

用户评论 (0)

发表评论

captcha

相关资源

Delphi IDE 包提供即时代码分析和 linting

将SonarDelphi(一款具有 100 多种代码分析规则的 Delphi 静态分析器)引入 Delphi IDE动态分析一个或多个文件,缩短反馈循环,这样您就可以在签入之前发现并解决问题检测到的问题及其描述和理由以内联方式显示在 IDE 中通过右键单击即可自动快速修复常见问题两种分析模式:独立 - 完全在本地运行分析无需外部服务器或其他工具应用常用的 Delphi 规则的默认规则集,或从 SonarDelphi 规则的完整列表中选择所需的编码样式已连接 - 连接到 SonarQube 实例,允许从服务器配置的质量配置文件中获取活动规则和配置抑制过去分析中已解决的问题服务器 SonarDelphi 版本的使用情况支持读取标准sonar-project.properties文件,提供额外配置Visual Studio Code 配套扩展,可用于在 VS Code 本身中运行分析并显示结果

1.57MB27积分

用 VisualBasic 编写的知识图谱数据库引擎

在脚本中导入R#包,然后创建一个空的图形数据库:import graphQLkb = MsgFile::open()

12.75MB32积分

Ruby on Rails

什么是 Rails?Rails 是一个 Web 应用程序框架,它包含根据 模型-视图-控制器 (MVC) 模式创建数据库支持的 Web 应用程序所需的一切。理解 MVC 模式是理解 Rails 的关键。MVC 将应用程序分为三层:模型、视图和控制器,每层都有特定的职责。模型层模型层代表领域模型(例如帐户、产品、人员、帖子等),并封装特定于应用程序的业务逻辑。在 Rails 中,数据库支持的模型类派生自 ActiveRecord::Base。Active Record允许您将数据库行中的数据显示为对象,并使用业务逻辑方法修饰这些数据对象。虽然大多数 Rails 模型都由数据库支持,但模型也可以是普通的 Ruby 类,或者是实现Active Model模块提供的一组接口的 Ruby 类。

12.37MB40积分

Go 是一种开源编程语言,可以轻松构建简单、可靠、高效的软件

下载并安装二进制发行版官方二进制发行版可在https://go.dev/dl/获得。下载二进制版本后,请访问https://go.dev/doc/install 获取安装说明。从源安装如果您的操作系统和架构组合没有可用的二进制分发版,请访问 https://go.dev/doc/install/source 获取源安装说明。

33.79MB13积分