摘要:
class Solution { public: bool isValidSudoku(vector<vector<char>>& board) { int xsp[9][9] = {0}; int ysp[9][9] = {0}; int lsp[9][9] = {0}; for(int i = 阅读全文
posted @ 2020-12-08 23:11
温暖了寂寞
阅读(79)
评论(0)
推荐(0)
摘要:
int* searchRange(int* nums, int numsSize, int target, int* returnSize){ int* arr = (int*)calloc(sizeof(int), 2); arr[0] = -1; arr[1] = -1; *returnSize 阅读全文
posted @ 2020-12-08 21:49
温暖了寂寞
阅读(98)
评论(0)
推荐(0)
摘要:
int search(int* nums, int numsSize, int target){ int val=nums[0], i; if(target>nums[0]){ for (i=1; i<numsSize && nums[i]>nums[0]; i++) if(nums[i]==tar 阅读全文
posted @ 2020-12-08 18:48
温暖了寂寞
阅读(57)
评论(0)
推荐(0)
摘要:
struct ListNode* swapPairs(struct ListNode* head) { struct ListNode dummyHead; dummyHead.next = head; struct ListNode* temp = &dummyHead; while (temp- 阅读全文
posted @ 2020-12-08 15:02
温暖了寂寞
阅读(69)
评论(0)
推荐(0)
摘要:
void recursion(char** arr,char* s,int cur,int cnt,int num,int n,int* returnSize){ if (cur == n*2){ arr[(*returnSize)] = (char*)calloc(n*2 + 1, sizeof( 阅读全文
posted @ 2020-12-08 13:52
温暖了寂寞
阅读(67)
评论(0)
推荐(0)
摘要:
//C快慢指针 struct ListNode* removeNthFromEnd(struct ListNode* head, int n) { struct ListNode* dummy = malloc(sizeof(struct ListNode)); dummy->val = 0, du 阅读全文
posted @ 2020-12-08 11:06
温暖了寂寞
阅读(89)
评论(0)
推荐(0)
摘要:
#define MAXLEN 50 int cmp(const void* a, const void* b){ return *(int*)a - *(int*)b; } int** fourSum(int* nums, int numsSize, int target, int* returnS 阅读全文
posted @ 2020-12-08 09:55
温暖了寂寞
阅读(78)
评论(0)
推荐(0)
摘要:
void recursion(char * digits, int* returnSize,char** arr,char** map,int cur,char* s,int len){ if (cur >= len){ arr[(*returnSize)] = (char*)calloc(len 阅读全文
posted @ 2020-12-08 09:26
温暖了寂寞
阅读(139)
评论(0)
推荐(0)

浙公网安备 33010602011771号