diff --git a/src/leetcode/cpp/0088.merge-sorted-array/CMakeLists.txt b/src/leetcode/cpp/0088.merge-sorted-array/CMakeLists.txt deleted file mode 100644 index 1c986a9d..00000000 --- a/src/leetcode/cpp/0088.merge-sorted-array/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ - -add_executable(lc-0088-merge-sorted-array - main.c - ) diff --git a/src/leetcode/cpp/0088.merge-sorted-array/main.c b/src/leetcode/cpp/0088.merge-sorted-array/main.c deleted file mode 100644 index 182897b0..00000000 --- a/src/leetcode/cpp/0088.merge-sorted-array/main.c +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2023 Xu Shaohua . All rights reserved. -// Use of this source is governed by General Public License that can be -// found in the LICENSE file. - -#include -#include -#include - -void merge(int* nums1, int nums1Size, int m, int* nums2, int nums2Size, int n) { - // Merge from end of nums1 - int i1 = m - 1; - int i2 = n - 1; - int index = m + n - 1; - while (i1 >= 0 && i2 >= 0) { - if (nums1[i1] > nums2[i2]) { - nums1[index] = nums1[i1]; - i1 -= 1; - } else { - nums1[index] = nums2[i2]; - i2 -= 1; - } - index -= 1; - } - while (i1 >= 0) { - nums1[index] = nums1[i1]; - index -= 1; - i1 -= 1; - } - while (i2 >= 0) { - nums1[index] = nums2[i2]; - index -= 1; - i2 -= 1; - } -} - -int main() { - return 0; -} diff --git a/src/leetcode/cpp/CMakeLists.txt b/src/leetcode/cpp/CMakeLists.txt index b37829b5..493a518e 100644 --- a/src/leetcode/cpp/CMakeLists.txt +++ b/src/leetcode/cpp/CMakeLists.txt @@ -32,7 +32,6 @@ add_subdirectory(0075.sort-colors) add_subdirectory(0082.remove-duplicates-from-sorted-list-ii) add_subdirectory(0083.remove-duplicates-from-sorted-list) add_subdirectory(0086.partition-list) -add_subdirectory(0088.merge-sorted-array) add_subdirectory(0092.reverse-linked-list-ii) add_subdirectory(0093.restore-ip-addresses) add_subdirectory(0098.validate-binary-search-tree)