- 博客(7)
- 收藏
- 关注
原创 LeetCode 刷题: Happy Number 的判断
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares
2015-12-28 15:38:12 1606 1
原创 LeetCode 刷题: 丑数 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 are ugly while 14 is not ugly sinc
2015-12-16 11:37:28 528
原创 老阳推荐的博客
关于一些security basic concept, 先收藏:http://www.cubrid.org/blog/dev-platform/understanding-encryption-security-through-java-cryptography-architecture/
2015-12-15 13:18:59 619
原创 LeetCode 刷题: 删除已排序链表中的重复节点
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.一种解法:/** * Definitio
2015-12-11 23:12:41 331
原创 标准错误和标准输出的重定向
1: 标准输出2: 标准错误一般情况下:./run > 1.txt以上命令只能讲标准输出重定向到1.txt.如果想把标准错误也重定向到1.txt, 命令如下:./run > 1.txt 2>&12>&1表示: 标准错误也重定向到标准输出。
2015-12-10 14:56:10 958
原创 Linux- 如何算出函数的运行时间
背景知识:1. time() 函数 - get time in secondsSynopsis#include time.h>time_t time(time_t *t);Descriptiontime() returns the time as the number of seconds since the Epoch, 1970-01-01 00:00:00
2015-12-03 10:53:26 427
原创 Linux- 线程函数如何将返回值传给主线程
网上找到几种方法,一一记录。1. 定义一个 包含 线程函数的 参数和返回值的 数据结构。例子如下:#include #include typedef struct thread_data { int a; int b; int result;} thread_data;void *myThread(void *arg){ thread_d
2015-12-02 16:56:07 4827
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人