摘要: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: Each elemen 阅读全文
posted @ 2016-07-24 04:05 Hygeia 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Given s 阅读全文
posted @ 2016-07-24 03:53 Hygeia 阅读(323) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), determine if a person could attend all mee 阅读全文
posted @ 2016-07-24 03:27 Hygeia 阅读(162) 评论(0) 推荐(0) 编辑
摘要: This is a follow up of Shortest Word Distance. The only difference is now word1 could be the same as word2. Given a list of words and two words word1  阅读全文
posted @ 2016-07-24 02:59 Hygeia 阅读(109) 评论(0) 推荐(0) 编辑
摘要: This is a follow up of Shortest Word Distance. The only difference is now you are given the list of words and your method will be calledrepeatedly man 阅读全文
posted @ 2016-07-24 02:50 Hygeia 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. For example,Assume that words = 阅读全文
posted @ 2016-07-24 02:49 Hygeia 阅读(127) 评论(0) 推荐(0) 编辑