随笔分类 -  leetCode刷题经历

摘要:In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. 阅读全文
posted @ 2017-11-23 23:17 皇家大鹏鹏 阅读(215) 评论(0) 推荐(0)
摘要: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 example, giv 阅读全文
posted @ 2017-11-23 22:06 皇家大鹏鹏 阅读(219) 评论(0) 推荐(0)
摘要:Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2017-11-21 17:14 皇家大鹏鹏 阅读(257) 评论(0) 推荐(0)
摘要:题目: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the to 阅读全文
posted @ 2017-05-31 09:58 皇家大鹏鹏 阅读(330) 评论(0) 推荐(0)
摘要:题目: Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: Example 1: 阅读全文
posted @ 2017-05-29 22:30 皇家大鹏鹏 阅读(395) 评论(0) 推荐(0)
摘要:题目: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum o 阅读全文
posted @ 2017-05-27 22:28 皇家大鹏鹏 阅读(689) 评论(0) 推荐(0)
摘要:一、汉明距离 The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, 阅读全文
posted @ 2017-05-25 11:57 皇家大鹏鹏 阅读(282) 评论(0) 推荐(0)