2023-11-29 11:09:53 +05:00
|
|
|
# My solutions
|
2022-12-03 12:19:24 +05:00
|
|
|
|
2023-11-29 11:09:53 +05:00
|
|
|
Solutions to various programming problems.
|
2022-11-17 15:09:28 +05:00
|
|
|
|
2023-11-29 11:09:53 +05:00
|
|
|
- [My leetcode profile](https://leetcode.com/ordinary-dev/)
|
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.
|
|
|
|
|
2023-11-29 11:09:53 +05:00
|
|
|
## 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
|
2023-11-29 11:09:53 +05:00
|
|
|
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 ./...
|
|
|
|
```
|
|
|
|
|
2023-03-09 00:35:49 +05:00
|
|
|
## Why Ruby?
|
|
|
|
|
|
|
|
Solving problems in Ruby can be a lot more fun than it first appears.
|
2023-11-29 11:09:53 +05:00
|
|
|
It is relatively slow language.
|
2023-03-09 00:35:49 +05:00
|
|
|
Sub-optimal C or Rust solutions will pass all tests,
|
|
|
|
but Ruby or Python solutions will not be able to meet the time limit.
|
|
|
|
This forces us to look for optimized algorithms.
|
2023-11-30 11:56:47 +05:00
|
|
|
|
|
|
|
## Why Go?
|
|
|
|
|
|
|
|
Go is used when stronger typing is required. This helps not to violate the conditions of the task.
|