Skip to Main Content

LeetCode Solutions 64

My solutions to some LeetCode-style coding problems.

binarysearch

3-6-9

  • python
leetcode

Best Time to Buy and Sell Stock

  • javascript
  • arrays
leetcode

Binary Search

  • python
  • javascript
  • binary search
leetcode

Binary Tree Inorder Traversal

  • python
  • binary trees
  • inorder traversal
  • dfs
leetcode

Binary Tree Postorder Traversal

  • python
  • binary trees
  • postorder traversal
  • dfs
leetcode

Binary Tree Preorder Traversal

  • python
  • binary trees
  • preorder traversal
  • dfs
leetcode

Climbing Stairs

  • python
  • javascript
  • memoization
  • dynamic programming
  • fibonacci
leetcode

Contains Duplicate

  • python
  • hash table
leetcode

Defanging an IP Address

  • javascript
  • strings
leetcode

Delete Node in a Linked List

  • python
  • linked lists
  • in-place
greatfrontend

Drop Right While

  • javascript
  • typescript
  • arrays
greatfrontend

Drop While

  • javascript
  • typescript
  • arrays
leetcode

Excel Sheet Column Number

  • python
  • math
  • strings
leetcode

Find Pivot Index

  • python
  • prefix sum
leetcode

Find the Middle Index in Array

  • python
  • lists
leetcode

Find the Index of the First Occurrence in a String

  • javascript
  • strings
leetcode

Fizz Buzz

  • python
greatfrontend

Flatten

  • javascript
  • arrays
  • recursion
leetcode

Happy Number

  • python
leetcode

Implement Queue using Stacks

  • javascript
  • stack
  • queue
leetcode

Invert Binary Tree

  • javascript
  • binary tree
  • bfs
  • dfs
leetcode

Is Subsequence

  • javascript
  • typescript
  • string
  • two pointers
leetcode

Kids With the Greatest Number of Candies

  • javascript
  • typescript
  • array
leetcode

Length of Last Word

  • javascript
  • strings
leetcode

Longest Common Prefix

  • python
  • strings
leetcode

Longest Substring Without Repeating Characters

  • javascript
  • strings
  • hash tables
leetcode

Majority Element

  • python
  • hash tables
  • sorting
leetcode

Merge Sorted Array

  • javascript
  • array
  • sorting
  • two pointers
leetcode

Merge Two Sorted Lists

  • python
  • javascript
  • linked lists
  • sorting
leetcode

Move Zeroes

  • python
  • javascript
  • in-place
  • two pointers
coderbyte

Moving Median

  • javascript
  • arrays
  • median
leetcode

Number of Good Pairs

  • javascript
  • hash table
binarysearch

Detect the Only Duplicate in a List

  • python
  • two pointers
  • array
leetcode

Palindrome Number

  • python
  • palindrome
leetcode

Pascal's Triangle I

  • python
  • arrays
leetcode

Pascal's Triangle II

  • python
  • arrays
leetcode

Plus One

  • javascript
  • array
leetcode

Remove Duplicates from Sorted Array

  • javascript
  • arrays
leetcode

Remove Duplicates from Sorted List

  • python
  • data structures
  • linked list
leetcode

Remove Element

  • javascript
  • arrays
  • in-place
leetcode

Remove Linked List Elements

  • python
  • linked lists
leetcode

Reverse Integer

  • javascript
  • math
leetcode

Reverse Linked List

  • python
  • linked lists
leetcode

Reverse String

  • python
leetcode

Reverse Vowels of a String

  • javascript
  • typescript
  • string
  • two pointers
leetcode

Reverse Words in a String

  • javascript
  • typescript
  • string
binarysearch

Robinhood

  • python
leetcode

Roman to Integer

  • python
  • math
  • numbers
leetcode

Running Sum of a 1D Array

  • python
  • prefix sum
leetcode

Search Insertion Position

  • javascript
  • arrays
leetcode

Single Number II

  • python
leetcode

Single Number

  • python
leetcode

Sliding Window Median

  • python
  • sliding window
  • arrays
leetcode

Sort Array By Parity

  • javascript
  • arrays
leetcode

Squares of a Sorted Array

  • javascript
  • two pointers
  • array
leetcode

To Lower Case

  • javascript
  • strings
coderbyte

Tree Constructor

  • javascript
  • binary tree
leetcode

Two Sum

  • python
  • javascript
  • typescript
structy

Undirected Path

  • python
  • graph
  • traversal
leetcode

Unique Paths

  • javascript
  • dynamic programming
leetcode

Valid Anagram

  • javascript
  • strings
  • hash tables
leetcode

Valid Palindrome II

  • javascript
  • strings
  • dynamic programming
leetcode

Valid Palindrome

  • javascript
  • python
  • palindrome
leetcode

Valid Parentheses

  • python
  • stack