Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/terenceponce/leetcode-elixir

My solutions to LeetCode problems written in Elixir
https://github.com/terenceponce/leetcode-elixir

leetcode leetcode-elixir leetcode-solutions

Last synced: about 2 months ago
JSON representation

My solutions to LeetCode problems written in Elixir

Awesome Lists containing this project

README

        

# Leet Code Practice

[![gh-actions](https://github.com/terenceponce/leetcode-elixir/workflows/CI/badge.svg)](https://github.com/terenceponce/leetcode-elixir/actions?workflow=CI)
[![codecov](https://codecov.io/gh/terenceponce/leetcode-elixir/graph/badge.svg?token=c4ynvTR4W3)](https://codecov.io/gh/terenceponce/leetcode-elixir)

These are my solutions to LeetCode problems written in Elixir.

All solutions have a corresponding test in [`test/solutions/`](test/solutions)

## Quick Start

```
git clone [email protected]:terenceponce/leetcode.git
cd leetcode
asdf install
mix test
```

## Problems

### Arrays & Hashing

#### Easy

- [1 - Two Sum](lib/solutions/00001_two_sum)
- [13 - Roman to Integer](lib/solutions/00013_roman_to_integer)
- [169 - Majority Element](lib/solutions/00169_majority_element)
- [217 - Contains Duplicate](lib/solutions/00217_contains_duplicate)
- [242 - Valid Anagram](lib/solutions/00242_valid_anagram)
- [1207 - Unique Number of Occurrences](lib/solutions/01207_unique_number_of_occurrences)
- [1365 - How Many Numbers Are Smaller Than The Current Number](lib/solutions/01365_how_many_numbers_are_smaller_than_the_current_number)
- [1512 - Number of Good Pairs](lib/solutions/01512_number_of_good_pairs)
- [2068 - Check Whether Two Strings Are Almost Equivalent](lib/solutions/02068_check_whether_two_strings_are_almost_equivalent)

#### Medium

- [49 - Group Anagrams](lib/solutions/00049_group_anagrams)

### Two Pointers

#### Easy

- [125 - Valid Palindrome](lib/solutions/00125_valid_palindrome)

### Sliding Window

#### Easy

- [121 - Best Time to Buy and Sell Stock](lib/solutions/00121_best_time_to_buy_and_sell_stock)

### Stack

#### Easy

- [20 - Valid Parentheses](lib/solutions/00020_valid_parentheses)

### Binary Search

#### Easy

- [704 - Binary Search](lib/solutions/00704_binary_search)

### Linked List

#### Easy

- [21 - Merge Two Sorted Lists](lib/solutions/00021_merge_two_sorted_lists)
- [206 - Reverse Linked List](lib/solutions/00206_reverse_linked_list)

#### Medium

- [2 - Add Two Numbers](lib/solutions/00002_add_two_numbers)

### Trees

#### Easy

- [100 - Same Tree](lib/solutions/00100_same_tree)
- [104 - Maximum Depth of Binary Tree](lib/solutions/00104_maximum_depth_of_binary_tree)
- [110 - Balanced Binary Tree](lib/solutions/00110_balanced_binary_tree)
- [226 - Invert Binary Tree](lib/solutions/00226_invert_binary_tree)
- [543 - Diameter of Binary Tree](lib/solutions/00543_diameter_of_binary_tree)
- [572 - Subtree of Another Tree](lib/solutions/00572_subtree_of_another_tree)