LeetCode – 121. Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i. If you were …
LeetCode – 88. Merge Sorted Array
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: Y…
LeetCode – 136. Single Number
Given an array of integers, every element appears twice except for one. Find that single one. Note: …
LeetCode – 26. Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and ret…
LeetCode – 27. Remove Element
Given an array and a value, remove all instances of that value in place and return the new length. D…
LeetCode – 35. Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the…
LeetCode – 459. Repeated Substring Pattern
Given a non-empty string check if it can be constructed by taking a substring of it and appending mu…
LeetCode – 422. Valid Word Square
Given a sequence of words, check whether it forms a valid word square. A sequence of words forms a v…
LeetCode – 415. Add Strings
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2…
LeetCode – 557. Reverse Words in a String III
Given a string, you need to reverse the order of characters in each word within a sentence while sti…