自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

转载 产生个N个不重复随机数数的快速算法

转自: http://blog.csdn.net/devfun/article/details/6534476 伪代码int startArray[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};//seed arrayint length = sizeof(startArray)/sizeof(int);     int N = 10;//随机数个

2017-03-26 20:57:13 5796

转载 (转载)c++实现反射机制

看到不错的分享一下,有侵犯权利请联系我删除,谢谢,转自 :http://blog.csdn.net/y1196645376/article/details/51455273 一.前言: Java有着一个非常突出的动态相关机制:Reflection,用在Java身上指的是我们可以于运行时加载、探知、使用编译期间完全未知的classes。换句话说,Java程序可以加载一个运行时才得知名称的

2017-03-07 22:43:01 273

转载 itoa microsoft 版本

附上itoa  microsoft 版本代码, 只能转换2-36进制 (36限制是因为 0-9 a-z 一共36个字符,大于36的话只能用乱码表示了) TCHAR * __cdecl _itox ( int val, TCHAR *buf, int radix ) { if (radix == 1

2017-02-28 16:27:19 443

原创 leetcode - 8. 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 and ask yourself what are the possible input ca

2017-02-28 11:25:03 302

原创 leetcode - 496. Next Greater Element I (stack)

ou are given two arrays (without duplicates) nums1 and nums2where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2.

2017-02-24 10:11:56 240

原创 leetcode - 338. Counting Bits (bit mannipulation)

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 them as an array. Example: For num = 5

2017-02-23 16:04:20 288

原创 leetcode - 500. Keyboard Row (map)

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", "Da

2017-02-23 11:28:18 434

原创 leetcode - 419. Battleships in a Board (logic)

Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may assume the following rules: You receive a valid

2017-02-22 22:53:03 220

原创 leetcode - 476. Number Complement (bit mannipulation)

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

2017-02-22 22:36:24 268

原创 leetcode - 461. Hamming Distance (bit mannipulation)

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,

2017-02-22 22:32:47 206

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除