You are given twonon-emptylinked lists representing two non-negative integers. The digi...
You are given twonon-emptylinked lists representing two non-negative integers. The digi...
You are given two stringssandt. Stringtis generated by random shuffling stringsand then...
Given a stringpath, which is anabsolute path(starting with a slash'/') to a file or dir...
Evaluate the value of an arithmetic expression inReverse Polish Notation[http://en.wiki...
Implement a last-in-first-out (LIFO) stack using only two queues. The implemented stack...
Implement a first in first out (FIFO) queue using only two stacks. The implemented queu...
Design a stack that supports push, pop, top, and retrieving the minimum element in cons...
Given anm x nmatrixboardcontaining'X'and'O',capture all regions that are 4-directionall...
Given anm x n2D binary gridgridwhich represents a map of'1's (land) and'0's (water), re...
Given anm x ngrid of charactersboardand a stringword, returntrueifwordexists in the gri...
Write an efficient algorithm that searches for atargetvalue in anm x nintegermatrix. Th...
Write an efficient algorithm that searches for a value in anm x nmatrix. This matrix ha...
Given ann x nmatrixwhere each of the rows and columns are sorted in ascending order, re...
Given anm x ninteger matrixmatrix, if an element is0, set its entire row and column to0...
Given a positive integern, generate ann x nmatrixfilled with elements from1ton2in spira...
You are given ann x n2Dmatrixrepresenting an image, rotate the image by90degrees (clock...
Given anm x nmatrix, returnall elements of thematrixin spiral order. # 1. 横向遍历m,纵向遍历n-1...
Given alinked list, swap every two adjacent nodes and return its head. You must solve t...
Given theheadof a singly linked list, group all the nodes with odd indices together fol...
Givenhead, the head of a linked list, determine if the linked list has a cycle in it. T...