Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ierturk/rust-practice

Rust Language Practice
https://github.com/ierturk/rust-practice

algorithm algorithms algorithms-and-data-structures data-structures dsa practice project-template recruitment-test rust rust-lang rust-practice template-project testing unit-testing

Last synced: about 9 hours ago
JSON representation

Rust Language Practice

Awesome Lists containing this project

README

        

# Codility Solutions in Rust

## Lessons

Here are my solutions to the codility lessons in Rust. You can find the lessons [here](https://app.codility.com/programmers/lessons/).

| Task | Solution |
|:------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
| **Lesson 1 - Iterations** | |
| [BinaryGap](https://app.codility.com/programmers/lessons/1-iterations/binary_gap/) | [binary_gap.rs](src/iterations/binary_gap.rs) |
| **Lesson 2 - Arrays** | |
| [CyclicRotation](https://app.codility.com/programmers/lessons/2-arrays/cyclic_rotation/) | [cyclic_rotation.rs](src/arrays/cyclic_rotation.rs) |
| [OddOccurencesInArray](https://app.codility.com/programmers/lessons/2-arrays/odd_occurrences_in_array/) | [odd_occurrences_in_array.rs](src/arrays/odd_occurrences_in_array.rs) |
| **Lesson 3 - Time Complexity** | |
| [FrogJmp](https://app.codility.com/programmers/lessons/3-time_complexity/frog_jmp/) | [frog_jmp.rs](src/time_complexity/frog_jmp.rs) |
| [PermMissingElem](https://app.codility.com/programmers/lessons/3-time_complexity/perm_missing_elem/) | [perm_missing_elem.rs](src/time_complexity/perm_missing_elem.rs) |
| [TapeEquilibrium](https://app.codility.com/programmers/lessons/3-time_complexity/tape_equilibrium/) | [tape_equilibrium.rs](src/time_complexity/tape_equilibrium.rs) |
| **Lesson 4 - Counting Elements** | |
| [FrogRiverOne](https://app.codility.com/programmers/lessons/4-counting_elements/frog_river_one/) | [frog_river_one.rs](src/counting_elements/frog_river_one.rs) |
| [PermCheck](https://app.codility.com/programmers/lessons/4-counting_elements/perm_check/) | [perm_check.rs](src/counting_elements/perm_check.rs) |
| [MaxCounters](https://app.codility.com/programmers/lessons/4-counting_elements/max_counters/) | [max_counters.rs](src/counting_elements/max_counters.rs) |
| [MissingInteger](https://app.codility.com/programmers/lessons/4-counting_elements/missing_integer/) | [missing_integer.rs](src/counting_elements/missing_integer.rs) |
| **Lesson 5 - Prefix Sums** | |
| [PassingCars](https://app.codility.com/programmers/lessons/5-prefix_sums/passing_cars/) | [passing_cars.rs](src/prefix_sums/passing_cars.rs) |
| [CountDiv](https://app.codility.com/programmers/lessons/5-prefix_sums/count_div/) | [count_div.rs](src/prefix_sums/count_div.rs) |
| [GenomicRangeQuery](https://app.codility.com/programmers/lessons/5-prefix_sums/genomic_range_query/) | [genomic_range_query.rs](src/prefix_sums/genomic_range_query.rs) |
| [MinAvgTwoSlice](https://app.codility.com/programmers/lessons/5-prefix_sums/min_avg_two_slice/) | [min_avg_two_slice.rs](src/prefix_sums/min_avg_two_slice.rs) |
| **Lesson 6 - Sorting** | |
| [Distinct](https://app.codility.com/programmers/lessons/6-sorting/distinct/) | [distinct.rs](src/sorting/distinct.rs) |
| [MaxProductOfThree](https://app.codility.com/programmers/lessons/6-sorting/max_product_of_three/) | [max_product_of_three.rs](src/sorting/max_product_of_three.rs) |
| [Triangle](https://app.codility.com/programmers/lessons/6-sorting/triangle/) | [triangle.rs](src/sorting/triangle.rs) |
| [NumberOfDiscIntersections](https://app.codility.com/programmers/lessons/6-sorting/number_of_disc_intersections/) | [number_of_disc_intersections.rs](src/sorting/number_of_disc_intersections.rs) |
| **Lesson 7 - Stacks and Queues** | |
| [Brackets](https://app.codility.com/programmers/lessons/7-stacks_and_queues/brackets/) | [brackets.rs](src/stacks_and_queues/brackets.rs) |
| [Fish](https://app.codility.com/programmers/lessons/7-stacks_and_queues/fish/) | [fish.rs](src/stacks_and_queues/fish.rs) |
| [Nesting](https://app.codility.com/programmers/lessons/7-stacks_and_queues/nesting/) | [nesting.rs](src/stacks_and_queues/nesting.rs) |
| [StoneWall](https://app.codility.com/programmers/lessons/7-stacks_and_queues/stone_wall/) | [stone_wall.rs](src/stacks_and_queues/stone_wall.rs) |
| **Lesson 8 - Leader** | |
| [Dominator](https://app.codility.com/programmers/lessons/8-leader/dominator/) | [dominator.rs](src/leader/dominator.rs) |
| [EquiLeader](https://app.codility.com/programmers/lessons/8-leader/equi_leader/) | [equi_leader.rs](src/leader/equi_leader.rs) |
| **Lesson 9 - Maximum Slice Problem** | |
| [MaxProfit](https://app.codility.com/programmers/lessons/9-maximum_slice_problem/max_profit/) | [max_profit.rs](src/maximum_slice_problem/max_profit.rs) |
| [MaxSliceSum](https://app.codility.com/programmers/lessons/9-maximum_slice_problem/max_slice_sum/) | [max_slice_sum.rs](src/maximum_slice_problem/max_slice_sum.rs) |
| [MaxDoubleSliceSum](https://app.codility.com/programmers/lessons/9-maximum_slice_problem/max_double_slice_sum/) | [max_double_slice_sum.rs](src/maximum_slice_problem/max_double_slice_sum.rs) |
| **Lesson 10 - Prime and Composite Numbers** | |
| [CountFactors](https://app.codility.com/programmers/lessons/10-prime_and_composite_numbers/count_factors/) | [count_factors.rs](src/prime_and_composite_numbers/count_factors.rs) |
| [MinPerimeterRectangle](https://app.codility.com/programmers/lessons/10-prime_and_composite_numbers/min_perimeter_rectangle/) | [min_perimeter_rectangle.rs](src/prime_and_composite_numbers/min_perimeter_rectangle.rs) |
| [Flags](https://app.codility.com/programmers/lessons/10-prime_and_composite_numbers/flags/) | [flags.rs](src/prime_and_composite_numbers/flags.rs) |
| [Peaks](https://app.codility.com/programmers/lessons/10-prime_and_composite_numbers/peaks/) | [peaks.rs](src/prime_and_composite_numbers/peaks.rs) |
| **Lesson 11 - Sieve Of Eratosthenes** | |
| [CountNonDivisible](https://app.codility.com/programmers/lessons/11-sieve_of_eratosthenes/count_non_divisible/) | [count_non_divisible.rs](src/sieve_of_eratosthenes/count_non_divisible.rs) |
| [CountSemiprimes](https://app.codility.com/programmers/lessons/11-sieve_of_eratosthenes/count_semiprimes/) | [count_semiprimes.rs](src/sieve_of_eratosthenes/count_semiprimes.rs) |
| **Lesson 12 - Euclidean Algorithm** | |
| [ChocolatesByNumbers](https://app.codility.com/programmers/lessons/12-euclidean_algorithm/chocolates_by_numbers/) | [chocolates_by_numbers.rs](src/euclidean_algorithm/chocolates_by_numbers.rs) |
| [CommonPrimeDivisors](https://app.codility.com/programmers/lessons/12-euclidean_algorithm/common_prime_divisors/) | [common_prime_divisors.rs](src/euclidean_algorithm/common_prime_divisors.rs) |
| **Lesson 13 - Fibonacci Numbers** | |
| [FibFrog](https://app.codility.com/programmers/lessons/13-fibonacci_numbers/fib_frog/) | [fib_frog.rs](src/fibonacci_numbers/fib_frog.rs) |
| [Ladder](https://app.codility.com/programmers/lessons/13-fibonacci_numbers/ladder/) | [ladder.rs](src/fibonacci_numbers/ladder.rs) |
| **Lesson 14 - Binary Search Algorithm** | |
| [MinMaxDivision](https://app.codility.com/programmers/lessons/14-binary_search_algorithm/min_max_division/) | [min_max_division.rs](src/binary_search_algorithm/min_max_division.rs) |
| [NailingPlanks](https://app.codility.com/programmers/lessons/14-binary_search_algorithm/nailing_planks/) | [nailing_planks.rs](src/binary_search_algorithm/nailing_planks.rs) |
| **Lesson 15 - Caterpillar Method** | |
| [AbsDistinct](https://app.codility.com/programmers/lessons/15-caterpillar_method/abs_distinct/) | [abs_distinct.rs](src/caterpillar_method/abs_distinct.rs) |
| [CountDistinctSlices](https://app.codility.com/programmers/lessons/15-caterpillar_method/count_distinct_slices/) | [count_distinct_slices.rs](src/caterpillar_method/count_distinct_slices.rs) |
| [CountTriangles](https://app.codility.com/programmers/lessons/15-caterpillar_method/count_triangles/) | [count_triangles.rs](src/caterpillar_method/count_triangles.rs) |
| [MinAbsSumOfTwo](https://app.codility.com/programmers/lessons/15-caterpillar_method/min_abs_sum_of_two/) | [min_abs_sum_of_two.rs](src/caterpillar_method/min_abs_sum_of_two.rs) |
| **Lesson 16 - Greedy Algorithms** | |
| [MaxNonoverlappingSegments](https://app.codility.com/programmers/lessons/16-greedy_algorithms/max_nonoverlapping_segments/) | [max_nonoverlapping_segments.rs](src/greedy_algorithms/max_nonoverlapping_segments.rs) |
| [TieRopes](https://app.codility.com/programmers/lessons/16-greedy_algorithms/tie_ropes/) | [tie_ropes.rs](src/greedy_algorithms/tie_ropes.rs) |
| **Lesson 17 - Dynamic Programming** | |
| [NumberSolitaire](https://app.codility.com/programmers/lessons/17-dynamic_programming/number_solitaire/) | [number_solitaire.rs](src/dynamic_programming/number_solitaire.rs) |
| [MinAbsSum](https://app.codility.com/programmers/lessons/17-dynamic_programming/min_abs_sum/) | [min_abs_sum.rs](src/dynamic_programming/min_abs_sum.rs) |

## License
This repository is licensed under [MIT](LICENSE).

## Credits, Thanks to...
* [@markhary](https://github.com/markhary) for [this repository](https://github.com/markhary/codility)
* [@Behrouz.m](https://github.com/Behrouz-m) for [this repository](https://github.com/Behrouz-m/Codility)