Leetcode
Showcasing my solutions to Leetcode problems in Go alongside my thought process and approach to solving them.
76. Minimum Window Substring
Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t ( including duplicates) is included in the window. If there is no such substring, return the empty string "".
239. Sliding Window Maximum
You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position.
567. Permutation in String
Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise.
19. Remove Nth Node From End of List
Given the head of a linked list, remove the nth node from the end of the list and return its head.
143. Reorder List
You are given the head of a singly linked-list. The list can be represented as:
33. Search in Rotated Sorted Array
There is an integer array nums sorted in ascending order (with distinct values).
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:
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].