摘要:
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case. class Solution {private: vector<string> result; map<string, vector<string>> m;public: vector<string> anagrams(vector<string> &strs) { // Start typing yo 阅读全文
posted @ 2013-05-07 22:28
冰点猎手
阅读(150)
评论(0)
推荐(0)
摘要:
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],[15,18]. /** * Definition for an interval. * struct Interval { * int start; * int end; * Interval() : start(0), end(0) {} * Interval(int s, int e) : star... 阅读全文
posted @ 2013-05-07 09:17
冰点猎手
阅读(163)
评论(0)
推荐(0)

浙公网安备 33010602011771号