上一页 1 2 3 4 5 6 7 ··· 11 下一页

2016年8月4日

对齐方式

摘要: 参考资料: http://blog.csdn.net/jk110333/article/details/19237969 阅读全文

posted @ 2016-08-04 22:06 whl-hl 阅读(149) 评论(0) 推荐(0) 编辑

2016年8月3日

printf("%d, %d\n", i++, ++i)的输出结果是确定的吗???

摘要: 1. 问题描述 以下代码的输出结果是什么? 题目1: 题目2: 2. 解题思路【错误】 printf参数是从右至左入栈的,故: 题目1的输出为:11,12 题目2的输出为: 3. 反思 注意:该类题目编译器不一样,结果就会不一样,即这种行为依赖编译器!!!不必纠结。 原因分析: C/C++语言没有规 阅读全文

posted @ 2016-08-03 06:52 whl-hl 阅读(5378) 评论(0) 推荐(0) 编辑

2016年7月21日

在赋值运算符函数中,类的实例能直接访问私有数据成员???

摘要: 印象中,private的数据成员只能在类的成员函数中使用,无法通过类的对象直接访问!(错误理解) 正确的理解是:在类的成员函数中,可以直接访问私有成员。即只要在该类的成员函数中,无论是直接访问该类的私有数据成员,还是访问某个对象(必选是该类型)的私有数据成员,均是可以的!!! 借鉴网上(http:/ 阅读全文

posted @ 2016-07-21 06:37 whl-hl 阅读(796) 评论(0) 推荐(0) 编辑

2016年7月20日

371. Sum of Two Integers

摘要: 1. 问题描述 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.Tags:B 阅读全文

posted @ 2016-07-20 23:58 whl-hl 阅读(160) 评论(0) 推荐(0) 编辑

2016年7月17日

342. Power of Four

摘要: 1. 问题描述 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, r 阅读全文

posted @ 2016-07-17 22:09 whl-hl 阅读(247) 评论(0) 推荐(0) 编辑

2016年7月14日

326. Power of Three

摘要: 1. 问题描述 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?Tags: M 阅读全文

posted @ 2016-07-14 22:26 whl-hl 阅读(147) 评论(0) 推荐(0) 编辑

2016年7月12日

231. Power of Two

摘要: 1. 问题描述 Given an integer, write a function to determine if it is a power of two.Tags: Math Bit ManipulationSimilar Problems: (E) Number of 1 Bits (E) 阅读全文

posted @ 2016-07-12 23:05 whl-hl 阅读(147) 评论(0) 推荐(0) 编辑

2016年7月3日

191. Number of 1 Bits

摘要: 1. 问题描述 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 阅读全文

posted @ 2016-07-03 22:36 whl-hl 阅读(117) 评论(0) 推荐(0) 编辑

2016年6月29日

283. Move Zeroes

摘要: 1. 问题描述 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 exam 阅读全文

posted @ 2016-06-29 22:04 whl-hl 阅读(153) 评论(0) 推荐(0) 编辑

2016年6月27日

237. Delete Node in a Linked List

摘要: 1. 问题描述 Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 阅读全文

posted @ 2016-06-27 22:45 whl-hl 阅读(120) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 11 下一页

导航