摘要:
问题描述Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after rainin... 阅读全文
摘要:
问题描述You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?解决思路难点在于,如何... 阅读全文
摘要:
问题描述Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order r... 阅读全文
摘要:
问题描述Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators... 阅读全文
摘要:
问题描述Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longes... 阅读全文
摘要:
问题描述Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.F... 阅读全文
摘要:
问题描述Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.解决思路难点在于如何不使用辅助空间。一个巧妙的想法是,1. 使用两个标记变量,row0_has_zeros和col... 阅读全文