- 博客(22)
- 资源 (33)
- 收藏
- 关注
原创 Reverse Integer
https://leetcode.com/problems/reverse-integer/Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321Have you thought about this? Here are some good questions to as
2016-07-28 22:51:45 347
原创 String to Integer (atoi)
https://leetcode.com/problems/string-to-integer-atoi/Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below
2016-07-28 22:37:11 504
原创 Missing Number
https://leetcode.com/problems/missing-number/Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.For example, Given nums = [0, 1, 3] retu
2016-07-27 00:42:33 333
原创 Single Number
https://leetcode.com/problems/single-number/Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. C
2016-07-27 00:28:02 297
原创 Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 00111001011110
2016-07-24 22:31:40 427
原创 GNU make - functions
$(function-name arg1 [, argn ])#String Functions1. $(filter pattern…,text)words := he the hen other the% get-the: @echo he matches: (filterhe,(filter he, (words)) @echo %he matches: (filter(
2016-07-24 11:24:15 414
原创 Ugly Number
https://leetcode.com/problems/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 2, 3, 5. For example, 6, 8
2016-07-24 10:44:42 285
原创 Power of Three
https://leetcode.com/problems/power-of-three/Given an integer, write a function to determine if it is a power of three.Follow up: Could you do it without using any loop / recursion?3的次方数没有显著的特点,最直接的方法
2016-07-24 10:25:35 265
原创 Power of Four
https://leetcode.com/problems/power-of-four/Given an integer (signed 32 bits), write a function to check whether it is a power of 4.Example: Given num = 16, return true. Given num = 5, return false.Fo
2016-07-24 10:17:10 309
原创 Add Binary
https://leetcode.com/problems/add-binary/Given two binary strings, return their sum (also a binary string).For example, a = “11” b = “1” Return “100”.计算过程类似Verilog的全加器。char* addBinary(char* a, char*
2016-07-23 17:48:48 307
原创 Counting Bits
https://leetcode.com/problems/counting-bits/Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return t
2016-07-23 16:26:42 273
原创 Number of 1 Bits
https://leetcode.com/problems/number-of-1-bits/Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight).For example, the 32-bit integ
2016-07-23 14:57:53 246
原创 Power of Two
https://leetcode.com/problems/power-of-two/Given an integer, write a function to determine if it is a power of two.数字 2^n 是大于0的,而且等于1左移n位得到的数字,所以2^n与2^n-1 相与运算得到0.bool isPowerOfTwo(int n) { if(n <=
2016-07-23 14:37:52 271
原创 Contains Duplicate II
https://leetcode.com/problems/contains-duplicate-ii/Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the
2016-07-23 14:05:53 347
原创 Contains Duplicate
https://leetcode.com/problems/contains-duplicate/Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array
2016-07-23 12:24:23 340
原创 Intersection of Two Arrays
https://leetcode.com/problems/intersection-of-two-arrays/Given two arrays, write a function to compute their intersection.Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note: Each el
2016-07-23 11:44:46 332
原创 Move Zeroes
https://leetcode.com/problems/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.For example, given nums =
2016-07-23 00:24:56 280
原创 Invert Binary Tree
https://leetcode.com/problems/invert-binary-tree/Invert a binary tree.4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1给出一棵二叉树,求这棵二叉树的镜像。搬运九章上的实现
2016-07-22 23:46:38 294
原创 Maximum Depth of Binary Tree
https://leetcode.com/problems/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 the root node down to the far
2016-07-22 23:21:30 396
原创 Add Digits
https://leetcode.com/problems/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 process is like: 3 + 8 = 11,
2016-07-22 00:35:07 299
原创 sum of two integers
https://leetcode.com/problems/sum-of-two-integers/Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example: Given a = 1 and b = 2, return 3.注释,这个题目有意思,学过F
2016-07-21 23:46:05 322
原创 reverse string
https://leetcode.com/problems/reverse-string/Write a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.1.char* reverseString(char* s) {
2016-07-21 23:09:37 276
SSE指令集测试程序
2012-09-26
VB仿制Windows图画程序
2010-11-14
C++ 桌面宠物-金鱼
2014-01-08
VC++ 透明flash控件
2013-12-30
[Windows.7.设备驱动程序开发].(Windows.7.Device.Driver).Reeves,.
2013-07-24
MATLAB模糊控制器(*.fis)C/C++接口文件
2013-01-03
C/C++模糊控制实现
2013-01-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人