Leetcode-Solutions icon indicating copy to clipboard operation
Leetcode-Solutions copied to clipboard

The repository for all of the solutions to the Leetcode problems solved on my YouTube, Instagram and TikTok

Results 34 Leetcode-Solutions issues
Sort by recently updated
recently updated
newest added

* moves Pacific Atlantic problem into a directory folder so future algos can live in folders containing solutions as well * includes TS and Go solutions for pacific atlantic problem...

Simplified the solution using top, bottom, left and right pointers

How are you doing Greg, I've identified an issue with the current solution for LeetCode 383: Ransom Note. The existing solution did not accurately reflect the correct space complexity, which...

class Solution: def findClosestNumber(self, nums: List[int]) -> int: min_distance = float("inf") res = None for num in nums: distance = abs(num) if distance < min_distance or (distance == min_distance and...

Easy method to solve and understand the algorithm.

Hello, Greg! The variable 'i' is missing initialization before line 9 in 'Longest Common Prefix - Leetcode 14/Longest Common Prefix - Leetcode 14.py'

Easy method to solve and understand the algorithm

Use if statement instead of while to get back one zero to find the next maximum consecutive subsequence of 1. Please find my explanation. ![image](https://github.com/gahogg/Leetcode-Solutions/assets/27046211/d4e8c406-919a-466c-8709-a130a30add6a)

Note to @gahogg : Thanks a lot for being an inspiration. Your approach to problems are very unique and you have a clean thought process. We can avoid the internal...