摘要:
language: C 与主站34 基本一样 address // 先用二分法找到第一个,如果找不到,返回0个,找得到,再以此为起点左右计算数量 int search(int* nums, int numsSize, int target){ int low = 0,high = numsSize- 阅读全文
摘要:
language: C address // nt题,不解释 /** * Note: The returned array must be malloced, assume caller calls free(). */ int* printNumbers(int n, int* returnSiz 阅读全文
摘要:
language: C address // 考研做过,不解释 int majorityElement(int* nums, int numsSize){ int ans,count = 0; for(int i = 0; i < numsSize; i++){ if(count==0){ ans 阅读全文