![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Homework
晨曦丶s
乳臭未干,一窍不通,但我肯学。
展开
-
414. Third Maximum Number
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n). Example 1: Input: [3, 2,原创 2017-02-26 20:59:48 · 119 阅读 · 0 评论 -
1. 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 exactly one solution, and you may not use the same原创 2017-07-10 08:42:01 · 161 阅读 · 0 评论 -
389. Find the Difference
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at a random position. Find the letter that was ad原创 2017-07-14 19:19:08 · 242 阅读 · 0 评论 -
344. Reverse String
Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 解题思路:很简单的逆转题 class Solution { public: void my_swap(char *s, cha原创 2017-07-14 18:59:31 · 127 阅读 · 0 评论 -
557. Reverse Words in a String III
Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. Example 1: Input: "Let's take LeetCode contest"原创 2017-07-14 09:55:04 · 211 阅读 · 0 评论 -
500. Keyboard Row
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Example 1: Input: ["Hello", "Alaska", "Dad原创 2017-07-14 09:45:31 · 166 阅读 · 0 评论 -
476. Number Complement
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given integer is guaranteed to fit within the range of原创 2017-07-12 08:25:47 · 129 阅读 · 0 评论 -
595. Big Countries
There is a table World +-----------------+------------+------------+--------------+---------------+ | name | continent | area | population | gdp | +-----------------+--原创 2017-07-11 12:16:30 · 336 阅读 · 0 评论 -
561. Array Partition I
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as pos原创 2017-07-11 09:18:42 · 119 阅读 · 0 评论 -
617. Merge Two Binary Trees
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to merge them into a new binary tr原创 2017-07-11 08:51:43 · 235 阅读 · 0 评论 -
461. Hamming Distance
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the Hamming distance. Note: 0 ≤ x, y 31.原创 2017-07-10 09:18:44 · 128 阅读 · 0 评论