Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.You may assume that each inpu
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes conta
A message containing letters from A-Z can be encoded into numbers using the following mapping:To decode an encoded message, all the digits must be gro
The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value and the median is the mean of the
Given two strings s and t, determine if they are isomorphic.Two strings s and t are isomorphic if the characters in s can be replaced to get t.All occ
A peak element is an element that is strictly greater than its neighbors.Given an integer array nums, find a peak element, and return its index. If th
order and str are strings composed of lowercase letters. In order, no letter occurs more than once.order was sorted in some custom order previously. W
Given an integer array nums, return the number of triplets chosen from the array that can make triangles if we take them as side lengths of a triangle
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia:
Given an integer array nums, design an algorithm to randomly shuffle the array. All permutations of the array should be equally likely as a result of
문제 > You are given an array prices where prices[i] is the price of a given stock on the ith day. > You want to maximize your profit by choosing a sin
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.A subarray is
You are given a nested list of integers nestedList. Each element is either an integer or a list whose elements may also be integers or other lists.
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.For example, 2 is written as II in Roman numeral, just two ones adde
Given a string s, find the length of the longest substring without repeating characters.Example 1:Example 2:Example 3:Constraints:$0$ <= s.length &