摘要: 27. 移除元素 - 力扣(LeetCode) int removeElement(int* nums, int numsSize, int val){ int left = 0; int right = 0; while (right < numsSize){ if (nums[right] != 阅读全文
posted @ 2023-09-22 17:29 朵朵奇fa 阅读(36) 评论(0) 推荐(0) 编辑
摘要: int search(int* nums, int numsSize, int target){ int left = 0; int right = numsSize - 1; int middle; while (left <= right){ middle = (left + right) / 阅读全文
posted @ 2023-09-22 17:18 朵朵奇fa 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include<stdio.h> void prinfArray(int* nums, int size) { for (int i=0; i<size; i++) { printf("%d ", nums[i]); } printf("\n"); } in 阅读全文
posted @ 2023-09-22 14:12 朵朵奇fa 阅读(4) 评论(0) 推荐(0) 编辑