My solutions to various programming problems
Find a file
2023-03-13 21:37:25 +05:00
problems Problem 1582: Special positions in a binary matrix 2023-03-13 21:37:25 +05:00
.gitignore Problem 8: string to integer 2022-11-25 23:06:02 +05:00
license.txt Create license.txt 2022-11-17 17:16:30 +05:00
readme.md Add a note about Ruby 2023-03-09 00:35:49 +05:00

Rubycode

Solutions of leetcode problems in Ruby.

I don't claim to be the best programmer. These solutions may not be the most optimal, but these are my solutions.

How to run

cd problems/random-problem
ruby test.rb

Why Ruby?

Solving problems in Ruby can be a lot more fun than it first appears. Although it is a relatively simple programming language that does not require manual memory manipulation, it is also a relatively slow language. 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.

Structure

  • main.rb - the solution itself
  • test.rb - tests