Leetcode Solution - Best Time to Buy and Sell Stock
Problem Statement You are given an array prices where prices[i] is the price of…
Problem Statement You are given an array prices where prices[i] is the price of…
Problem Statement Given a Binary tree, print out nodes in level order traversal…
Problem Statement Given an array nums of n integers and an integer target, are…
Problem Statement You are given a string text of words that are placed among…
Problem Statement You are given a rows x cols matrix grid. Initially, you are…
Problem Statement Given a string s, return the maximum number of unique…
Problem Statement Replace all spaces in a string with ‘%20’ (three characters…
Problem Statement Given a string, determine if it is a palindrome, considering…
Problem Statement Given two strings s and t , write a function to determine if t…
Problem Statement Given a string, find the first non-repeating character in it…
Problem Statement Write a function that reverses a string. The input string is…
Problem Statement You are given an n x n 2D matrix representing an image, rotate…
Problem Statement Determine if a 9x9 Sudoku board is valid. Only the filled…
Problem Statement Given a non-empty array of digits representing a non-negative…
Problem Statement Given an array nums, write a function to move all 0’s to the…
Problem Statement Given two arrays, write a function to compute their…
Problem Statement Given a non-empty array of integers, every element appears…
Problem Statement Given an array of integers, find if the array contains any…
Problem Statement Maximum Length of Subarray With Positive Product. Given an…
Problem Statement Given an array, rotate the array to the right by k steps…
Problem Statement Say you have an array prices for which the ith element is the…
Problem Statement Given a sorted array nums, remove the duplicates in-place such…
Problem Statement Given a linked list, swap every two adjacent nodes and return…
Problem Statement Given an array nums of n integers and an integer target, find…
Problem Statement Given an array nums of n integers, are there elements a, b, c…
Problem Statement Roman numerals are represented by seven different symbols: I…
Problem Statement Roman numerals are represented by seven different symbols: I…
Problem Statement Write a function to find the longest common prefix string…
Problem Statement Given n non-negative integers a1, a2, …, an , where each…
Problem Statement Determine whether an integer is a palindrome. An integer is a…
Problem Statement Given a linked list, remove the n-th node from the end of list…
Problem Statement Implement atoi which converts a string to an integer…
Problem Statement Determine whether an integer is a palindrome. An integer is a…
Problem Statement The string “PAYPALISHIRING” is written in a zigzag pattern on…
Problem Statement Given a signed integer, reverse digits of an integer. Return…
Problem Statement Given a string s, find the longest palindromic substring in s…
Problem Statement There are two sorted arrays nums1 and nums2 of size m and n…
Problem Statement Given a string, find the length of the longest substring…
Problem Statement You are given two non-empty linked lists representing two non…
Problem Statement Given an array of integers, return indices of the two numbers…