摘要:
Number of IslandsGiven a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by con... 阅读全文
摘要:
Search a 2D Matrix IIWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each ... 阅读全文
摘要:
Search a 2D MatrixWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row... 阅读全文
摘要:
CandyThere areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following ... 阅读全文
摘要:
Wildcard MatchingImplement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters... 阅读全文
摘要:
Sliding Window MaximumGiven an arraynums, there is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can... 阅读全文
摘要:
Product of Array Except SelfGiven an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all the eleme... 阅读全文
摘要:
Delete Node in a Linked ListWrite a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the l... 阅读全文
摘要:
Unique PathsA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right a... 阅读全文
摘要:
Lowest Common Ancestor of a Binary TreeGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to thedefin... 阅读全文