摘要:
Problem statement: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the in 阅读全文
摘要:
Proble statement: Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[ 阅读全文
摘要:
Problem statement: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Follow up: Did you use extra space?A 阅读全文
摘要:
Problem Statement: 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 阅读全文
摘要:
题目:输入一个英文句子,翻转句子中单词的顺序,但单词内字符的顺序不变。句子中单词以空格符隔开。为简单起见,标 点符号和普通字母一样处理。例如,输入"I am a student.",则输出"student. a am I"。 第一次遇到这道题是十一之前去一个公司笔试的时候,当时想到一个方法,似乎有点麻烦,只是在纸面上写了出来,并没有电脑上运行。后来去单位,跟几个同事讨论,得出了正确的思路,前段时间准备笔试的过程中在《程序 员面试宝典》中也见过,当时写出了全部代码的实现,并且运行正确,现在一个多月过去了,再次看到的时候该知道的方法依然记得,只是在编程的时候 阅读全文