My Leetcode Solutions
I decided to slowly work my way through LeetCode, a website that contains coding problems ranging in difficulty and topics including data structures and algorithms. My goal is to complete a few problems a week. I don't have a particular pattern for selecting problems, I usually just pick whatever sounds most interesting based on the title or by choosing one at random. My solutions are usually going to be written in JavaScript and I'll try to include a short write-up with my thoughts on the problem along with an analysis for whatever algorithm I come up with.
Algorithms
- Two Sum
- Binary Tree Level Order Traversal
- Last Stone Weight
- Convert Sorted Array to Binary Search Tree
- Distribute Candies to People
- Defanging an IP Address
- Cells with Odd Values in a Matrix
- Convert Binary Number in a Linked List to Integer
- Decompress Run-Length Encoded List
- Convert Integer to the Sum of Two No-Zero Integers
- Delete Leaves With a Given Value
- Find Lucky Integer in an Array
- Kids With the Greatest Number of Candies
- Insertion Sort List
- Majority Element
- Excel Sheet Column Number
- Valid Phone Numbers
- Add Two Numbers
- Remove Element
- Serialize and Deserialize Binary Tree
- Sum of Two Integers
- Permutations
- Sqrt(x)
- Jewels and Stones
- Binary Tree Inorder Traversal