随笔分类 -  LeetCode

Reverse Words in a String
摘要:question: Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Update (2015-02- 阅读全文
posted @ 2016-04-26 14:59 小菜鸡y 阅读(205) 评论(0) 推荐(0)
Reverse String
摘要:question: Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 阅读全文
posted @ 2016-04-25 22:12 小菜鸡y 阅读(165) 评论(0) 推荐(0)
Rotate Image
摘要:Question: 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? Su 阅读全文
posted @ 2016-04-25 16:12 小菜鸡y 阅读(207) 评论(0) 推荐(0)
Two Sum
摘要:Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2016-04-25 15:43 小菜鸡y 阅读(194) 评论(0) 推荐(0)