leetcode
Z_No
每天都在挣扎
展开
-
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 < 231.Examp原创 2017-10-22 16:46:32 · 158 阅读 · 0 评论 -
Judge Route Circle
Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the original place.The move sequence is represented by a原创 2017-10-22 17:38:02 · 175 阅读 · 0 评论 -
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 tree. T原创 2017-10-22 20:27:07 · 118 阅读 · 0 评论 -
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 possibl原创 2017-10-22 21:24:12 · 175 阅读 · 0 评论