my-solutions/readme.md

60 lines
1.2 KiB
Markdown
Raw Normal View History

# My solutions
2022-12-03 12:19:24 +05:00
Solutions to various programming problems.
2022-11-17 15:09:28 +05:00
- [My leetcode profile](https://leetcode.com/ordinary-dev/)
- [My codeforces profile](https://codeforces.com/profile/re.ivan)
2022-11-17 17:03:36 +05:00
2022-12-31 12:14:39 +05:00
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:
2022-11-17 17:03:36 +05:00
2022-11-25 23:43:40 +05:00
```bash
cd random-problem
2022-11-25 23:43:40 +05:00
ruby test.rb
```
2023-11-30 11:56:47 +05:00
Go:
```bash
cd random-problem
go test ./...
```
2024-02-12 10:27:41 +05:00
Rust:
```bash
cd random-problem
cargo test
```
2023-03-09 00:35:49 +05:00
## Why Ruby?
Solving problems in Ruby can be a lot more fun than it first appears.
It is relatively slow language.
2023-03-09 00:35:49 +05:00
Sub-optimal C or Rust solutions will pass all tests,
2024-02-12 10:27:41 +05:00
but Ruby solutions will not be able to meet the time limit.
2023-03-09 00:35:49 +05:00
This forces us to look for optimized algorithms.
2023-11-30 11:56:47 +05:00
2024-02-12 10:27:41 +05:00
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++
2023-11-30 11:56:47 +05:00
2024-02-12 10:27:41 +05:00
C++ is used when I have no other suitable options for competitive programming.