摘要: 345. Reverse Vowels of a String Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Given s = "hello", r 阅读全文
posted @ 2016-05-14 17:53 19Q3 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 169. Majority Element Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. Y 阅读全文
posted @ 2016-05-14 17:49 19Q3 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 217. Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears a 阅读全文
posted @ 2016-05-14 17:45 19Q3 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 171. Excel Sheet Column Number Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding 阅读全文
posted @ 2016-05-14 17:39 19Q3 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 242. Valid Anagram Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return 阅读全文
posted @ 2016-05-14 17:37 19Q3 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 100. Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structura 阅读全文
posted @ 2016-05-14 17:33 19Q3 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 237. Delete Node in a Linked Lis t Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Suppos 阅读全文
posted @ 2016-05-14 17:27 19Q3 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 283. Move Zeroes Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. 阅读全文
posted @ 2016-05-14 17:21 19Q3 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 226. Invert Binary Tree Invert a binary tree. to 阅读全文
posted @ 2016-05-14 17:13 19Q3 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 104. Maximum Depth of Binary Tree Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from th 阅读全文
posted @ 2016-05-14 17:10 19Q3 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 258. Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the 阅读全文
posted @ 2016-05-14 17:05 19Q3 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 292. Nim Game(C++) You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to 阅读全文
posted @ 2016-05-14 16:54 19Q3 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 题目大意: 字 阅读全文
posted @ 2016-05-14 16:46 19Q3 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 263. Ugly Number Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 阅读全文
posted @ 2016-05-14 16:28 19Q3 阅读(245) 评论(0) 推荐(0) 编辑