文章分类 -  Algorithms

摘要:1. string reorder distant apart. reference:http://discuss.leetcode.com/questions/31/string-reorder-distance-apart2. Excel sheet numbers. reference: done but not perfect. reference:http://discuss.leetcode.com/questions/64/excel-sheet-row-numbers3. Search 2D array 3 questions, know how to slove the pr 阅读全文
posted @ 2013-06-27 11:22 pgu2 阅读(92) 评论(0) 推荐(0)
摘要:Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.Solution:void putlong(unsigned long n){ if( n<10) { putchar(n%10+'0'); } else { putlong(n/10); putchar(n%10+'0'); } } For exa... 阅读全文
posted @ 2013-06-26 03:23 pgu2 阅读(166) 评论(0) 推荐(0)