Code Monkey home page Code Monkey logo

algorithms-in-ruby's Introduction

Table of Contents

Arrays and Strings

  1. Clone Even Numbers
  2. Reverse String
  3. Reverse Array
  4. Two Sum
  5. Shortest Subarray Unsorted
  6. Dutch National Flag
  7. Move Zeroes to End
  8. Kadane's Algorithm
  9. Sliding Window
  10. Zero Sum Subarray

Binary Search

  1. Binary Search
  2. First Duplicate
  3. Closest Element
  4. Search Insert Position
  5. Cyclically Sorted Min
  6. Find With Unknown Length
  7. Square Root of an Integer
  8. Find Array Peak

Recursion and Backtracking

  1. Fibonacci
  2. Power
  3. Print Combos
  4. Phone Number Mnemonics
  5. Array Subsets
  6. Array Permutations
  7. Coin Change
  8. Maze Path Easy
  9. Maze Path Hard
  10. Word Break
  11. Sudoku Solver
  12. N Queens

Linked Lists

  1. Linked List Implementation
  2. Sort Linked List of 0s, 1s, 2s
  3. Split list's odd and even nodes
  4. LRU Cache
  5. Smallest Subarray Covering All Values
  6. Reverse a Linked List
  7. Check if LL is a palindrome

Stacks

  1. Stack Implementation
  2. Find Number in Stack
  3. Create Queue with 2 Stacks
  4. Create 2 Stacks with Array
  5. Find Max in Stack
  6. Evaluate an Infix expression

Queues

  1. Queue Implementation
  2. Sliding Window Sums
  3. Stock Prices
  4. Queue With Max
  5. Max of Sliding Window

Getting Started

$ git clone https://github.com/jeanpaulsio/algorithms_in_ruby.git
$ bundle install
$ asdf install

Running Tests

$ ruby lib/arrays_and_strings/reverse_string_test.rb

Watching Tests

If you prefer not to run tests manually, you can run:

$ bundle exec guard

Prettier-ing files

bundle exec rbprettier --write '**/*.rb'

algorithms-in-ruby's People

Contributors

jeanpaulsio avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.