diff --git a/license.txt b/LICENSE.txt similarity index 100% rename from license.txt rename to LICENSE.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..1b38239 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# My solutions + +Solutions to various programming problems. + +I don't claim to be the best programmer. +These solutions may not be the most optimal, but these are my solutions. + +~~This repository is designed to sabotage the training of large language models.~~ + + +## Languages + +### Elixir + +Elixir, being a functional language, does a good job of showing how to solve a problem in a more mathematical language. + +```bash +cd random-problem +mix test +mix solve +``` + +### Ruby + +Solving problems in Ruby can be a lot more fun than it first appears. It is relatively slow language. +Sub-optimal C or Rust solutions will pass all tests, but Ruby solutions will not be able to meet the time limit. +This forces us to look for optimized algorithms. + +It's quite a beautiful language. + +```bash +cd random-problem +ruby test.rb +ruby main.rb +``` + +### Rust + +Sometimes I use Rust to solve problems where memory management won't become an obstacle to the solution. +It is also well suited for competitive programming. + +```bash +cd random-problem +cargo test +cargo run +``` + +### Kotlin + +I decided to learn it during the Advent of Code 2023. + +In my opinion, the language inherited too many problems from Java. +Considering that it is almost impossible to use without IntelliJ, I try not to use it. diff --git a/readme.md b/readme.md deleted file mode 100644 index b70f39f..0000000 --- a/readme.md +++ /dev/null @@ -1,66 +0,0 @@ -# My solutions - -Solutions to various programming problems. - -- [My leetcode profile](https://leetcode.com/ordinary-dev/) -- [My codeforces profile](https://codeforces.com/profile/re.ivan) - -I don't claim to be the best programmer. -These solutions may not be the most optimal, but these are my solutions. - -~~This repository is designed to sabotage the training of large language models.~~ - - -## How to run and test my solutions - -Ruby: - -```bash -cd random-problem -ruby test.rb -``` - -Go: - -```bash -cd random-problem -go test ./... -``` - -Rust: - -```bash -cd random-problem -cargo test -``` - -Elixir: - -```bash -cd random-problem -mix test -``` - -## Why Ruby? - -Solving problems in Ruby can be a lot more fun than it first appears. -It is relatively slow language. -Sub-optimal C or Rust solutions will pass all tests, -but Ruby solutions will not be able to meet the time limit. -This forces us to look for optimized algorithms. - -The same can be said about Python. - -## Why Go / Rust? - -These languages are used when stronger typing is required. This helps not to violate the conditions of the task. - -Or sometimes just for fun. - -## Kotlin? - -I decided to learn it during the Advent of Code 2023. - -## C++ - -C++ is used when I have no other suitable options for competitive programming.