随笔分类 - 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.
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: Example 1:
阅读全文
摘要:题目: 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
阅读全文
摘要:一、汉明距离 The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y,
阅读全文

浙公网安备 33010602011771号