Day 12 of 30 days Leetcode challenge
Last Stone Weight We have a collection of stones, each stone has a positive integer weight. Each t ...
Last Stone Weight We have a collection of stones, each stone has a positive integer weight. Each t ...
Diameter of Binary Tree Given a binary tree, you need to compute the length of the diameter of the ...
Min Stack Design a stack that supports push, pop, top, and retrieving the minimum element in consta ...
Backspace String Compare Given two strings S and T, return if they are equal when both are typed in ...
Middle of the Linked List Given a non-empty, singly linked list with head node head, return a middl ...
Counting Element Given an integer array arr, count element x such that x + 1 is also in arr. If th ...
Group Anagrams Given an array of strings, group anagrams together. Example: Input: ["eat&quo ...
Best Time to Buy and Sell Stock II Say you have an array for which the ith element is the price of ...