随笔分类 -  LeetCode

摘要:题目:Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.For example, giv... 阅读全文
posted @ 2015-12-19 20:34 zhangbaochong 阅读(682) 评论(0) 推荐(0)
摘要:题目:Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complex... 阅读全文
posted @ 2015-12-18 22:00 zhangbaochong 阅读(231) 评论(0) 推荐(0)
摘要:题目:Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3... 阅读全文
posted @ 2015-12-17 16:14 zhangbaochong 阅读(553) 评论(0) 推荐(0)