format files

This commit is contained in:
2025-09-29 10:56:26 +08:00
parent af0fe8a168
commit 050164b61b
38 changed files with 38 additions and 38 deletions

View File

@@ -1 +1 @@
BasedOnStyle: Microsoft
BasedOnStyle: Microsoft

View File

@@ -22,4 +22,4 @@ int *getRow(int rowIndex, int *returnSize)
int main()
{
}
}

View File

@@ -27,4 +27,4 @@ char **removeSubfolders(char **folder, int folderSize, int *returnSize)
}
return ret;
}
}

View File

@@ -9,4 +9,4 @@ int getDecimalValue(struct ListNode *head)
head = head->next;
}
return x;
}
}

View File

@@ -14,4 +14,4 @@ int countGoodTriplets(int *arr, int arrSize, int a, int b, int c)
count++;
return count;
}
}

View File

@@ -35,4 +35,4 @@ int main()
printf("%s\n", ans);
free(ans);
return 0;
}
}

View File

@@ -22,4 +22,4 @@ int main()
assert(titleToNumber("ZY") == 701);
return 0;
}
}

View File

@@ -88,4 +88,4 @@ int maximumGain(char *s, int x, int y)
del(del(s, 'b', 'a', &score, y), 'a', 'b', &score, x);
return score;
}
}

View File

@@ -3,4 +3,4 @@
int *earliestAndLatest(int n, int firstPlayer, int secondPlayer, int *returnSize)
{
return 0;
}
}

View File

@@ -10,4 +10,4 @@ char *makeFancyString(char *s)
for (int j = i; j < len - 1; j++)
s[j] = s[j + 1];
return s;
}
}

View File

@@ -1,4 +1,4 @@
#include <solution/2163.h>
long long minimumDifference(int *nums, int numsSize)
{
}
}

View File

@@ -29,4 +29,4 @@ int main()
assert(containsNearbyDuplicate(nums2, sizeof(nums2) / sizeof(int), 1) == true);
int nums3[] = {1, 2, 3, 1, 2, 3};
assert(containsNearbyDuplicate(nums3, sizeof(nums3) / sizeof(int), 2) == false);
}
}

View File

@@ -65,4 +65,4 @@ int main()
assert(myStackEmpty(s) == false);
return 0;
}
}

View File

@@ -122,4 +122,4 @@ int main()
free(s);
return 0;
}
}

View File

@@ -24,4 +24,4 @@ int main()
assert(isPowerOfTwo(2) == true);
assert(isPowerOfTwo(0) == false);
assert(isPowerOfTwo(1) == true);
}
}

View File

@@ -69,4 +69,4 @@ void myQueueFree(MyQueue *obj)
free(obj->s1);
free(obj->s2);
free(obj);
}
}

View File

@@ -27,4 +27,4 @@ int matchPlayersAndTrainers(int *players, int playersSize, int *trainers, int tr
}
return match;
}
}

View File

@@ -28,4 +28,4 @@ int main()
assert(isUgly(14) == 0);
assert(isUgly(8) == 1);
return 0;
}
}

View File

@@ -36,4 +36,4 @@ int main()
fail:
return -1;
}
}

View File

@@ -15,4 +15,4 @@ long long minimumCost(char *s)
ans += min(i, n - i);
return ans;
}
}

View File

@@ -45,4 +45,4 @@ int main()
return 0;
fail:
return -1;
}
}

View File

@@ -70,4 +70,4 @@ bool wordPattern(char *pattern, char *s)
freeDict(d);
return true;
}
}

View File

@@ -49,4 +49,4 @@ int *numberGame(int *nums, int numsSize, int *returnSize)
printf("%d ", result[i]);
return result;
}
}

View File

@@ -41,4 +41,4 @@ void numArrayFree(NumArray *obj)
{
free(obj->data);
free(obj);
}
}

View File

@@ -18,4 +18,4 @@ int main()
{
assert(scoreOfString("hello") == 13);
assert(scoreOfString("zaz") == 50);
}
}

View File

@@ -30,4 +30,4 @@ bool isValid(char *word)
return false;
return haveVowel && haveConsonant;
}
}

View File

@@ -39,4 +39,4 @@ int countDays(int days, int **meetings, int meetingsSize, int *meetingsColSize)
return count + days - meetings[meetingsSize - 1][1];
return count;
}
}

View File

@@ -10,4 +10,4 @@ int maximumLength(int *nums, int numsSize)
nums[i] & 1 ? (odd = even + 1, odd_cnt++) : (even = odd + 1);
return max(max(even, odd), max(odd_cnt, numsSize - odd_cnt));
}
}

View File

@@ -2,4 +2,4 @@
int maximumLength(int *nums, int numsSize, int k)
{
}
}

View File

@@ -20,4 +20,4 @@ bool isPowerOfThree(int n)
// 我们只需要判断 n 是否是 3^19 的约数即可。
return n > 0 && 1162261467 % n == 0;
#endif
}
}

View File

@@ -10,4 +10,4 @@ int *countBits(int n, int *returnSize)
int main() {
return 0;
}
}

View File

@@ -12,4 +12,4 @@ int subarraySum(int *nums, int numsSize)
for (int j = max(0, i - nums[i]); j <= i; j++)
sum += nums[j];
return sum;
}
}

View File

@@ -29,4 +29,4 @@ char *reverseVowels(char *s)
}
return s;
}
}

View File

@@ -13,4 +13,4 @@ bool isPerfectSquare(int num)
if (i * i == num)
return true;
}
}
}

View File

@@ -49,4 +49,4 @@ int main()
fail:
return -1;
}
}

View File

@@ -14,4 +14,4 @@ int firstUniqChar(char *s)
return idx;
return -1;
}
}

View File

@@ -7,4 +7,4 @@ bool isSubsequence(char *s, char *t)
s++;
return !*s;
}
}

View File

@@ -34,4 +34,4 @@ struct TreeNode *expandBinaryTree(struct TreeNode *root)
{
inorder(root);
return root;
}
}