Leetcode
Showcasing my solutions to Leetcode problems in Go alongside my thought process and approach to solving them.
3. Longest Substring Without Repeating Characters
Given a string s, find the length of the longest substring without duplicate characters.
981. Time Based Key
Design a time-based key-value data structure that can store multiple values for the same key at different time stamps and retrieve the key's value at a certain timestamp.
33. Search in Rotated Sorted Array
There is an integer array nums sorted in ascending order (with distinct values).
875. Koko Eating Bananas
Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours.
206. Reverse Linked List
Given the head of a singly linked list, reverse the list, and return the reversed list.
155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
74. Search a 2D Matrix
You are given an m x n integer matrix matrix with the following two properties:
128. Longest Consecutive Sequence
Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.
238. Product of Array Except Self
Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].
49. Group Anagrams
Given an array of strings strs, group the anagrams together. You can return the answer in any order.