摘要:
LeetCode 278 First Bad Version// Forward declaration of isBadVersion API.bool isBadVersion(int version);int firstBadVersion(int n) { int start=1, e... 阅读全文
摘要:
LeetCode 205 Isomorphic Strings用到哈希映射bool isIsomorphic(char* s, char* t) { char charArrS[256] = { 0 }; char charArrT[256] = { 0 }; int i = 0;... 阅读全文
摘要:
LeetCode 88 Merge Sorted Array题目要求将nums2数组合并到nums1中(nums1的空间满足合并后的要求),可以考虑从后向前合并。void merge(int* nums1, int m, int* nums2, int n) { int i=m-1, j=n-... 阅读全文