自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 配置环境:OMAPL138 ARM+DSP syslink双核通信遇到的坑

根据创龙的环境配置文档一步一步的配置,结果出现了一些非预期的问题1、ubuntu 无法找到共享目录,解决方法卸载 open-vm-tools$ sudo apt-get remove open-vm-tools重新从git上下载vm tools$ git clone https://github.com/rasa/vmware-tools-patches.git$ cd vmware-tools-patches$ ./patched-open-vm-tools.sh参考链接:

2022-05-20 15:30:39 306

原创 LeetCode刷题日记(50. Pow(x, n))

50. Pow(x, n)double QuickMuti(double x, long int n) { if (n == 0) return 1.0; double y = QuickMuti(x, n/2); return n % 2 == 0 ? y * y : y * y * x;}double myPow(double x, int n) { long int N = n; double ans = n < 0 ? 1.0

2021-10-30 00:00:39 95

原创 刷题日记(6. Z 字形变换)

6. Z 字形变换#define ElementType charstruct MNode;typedef struct MNode* PtrToMNode;typedef PtrToMNode Vector;typedef PtrToMNode rPosition;typedef PtrToMNode bPosition;void bInsert(bPosition B);void PrintVector(Vector V);Vector CreateVector(int ro

2021-10-28 23:55:18 136

原创 LeetCode(34. 在排序数组中查找元素的第一个和最后一个位置)

34. 在排序数组中查找元素的第一个和最后一个位置/** * Note: The returned array must be malloced, assume caller calls free(). */int* searchRange(int* nums, int numsSize, int target, int* returnSize){ *returnSize = 2; int *res = calloc(2, sizeof(int)); res[0] =

2021-10-27 23:32:02 72

原创 LeetCode刷题日记(21. 合并两个有序链表)

21. 合并两个有序链表/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */struct ListNode* mergeTwoLists(struct ListNode* l1, struct ListNode* l2){ if (!l1 && !l2) return NULL;

2021-10-26 21:34:28 112

原创 刷题日记(19. 删除链表的倒数第 N 个结点)

19. 删除链表的倒数第 N 个结点/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */struct ListNode* removeNthFromEnd(struct ListNode* head, int n){ struct ListNode *dummy = malloc(sizeof(struc

2021-10-25 22:55:16 63

原创 LeetCode刷题日记(48. 旋转图像)

48.旋转图像/** * @param {number[][]} matrix * @return {void} Do not return anything, modify matrix in-place instead. */var rotate = function(matrix) { N = matrix.length if (N==1) return t = new Array(N*N) for (i=0; i<matrix.length; ..

2021-10-24 23:43:44 1492

原创 LeetCode刷题日记(1.两数之和)

两数之和暴力解法/** * Note: The returned array must be malloced, assume caller calls free(). */int* twoSum(int* nums, int numsSize, int target, int* returnSize){ int *res = calloc(2, sizeof(int)); for (int i=0; i<numsSize; i++) { for (in

2021-10-23 22:54:25 60

原创 LeetCode刷题日记(007.回文数)

007.回文数bool isPalindrome(int x){ if (x < 0) return 0; int num = x; int rev = 0; while (num >= 10) { rev = rev * 10 + num % 10; num /= 10; } return (rev == x / 10) && (num == (x % 10));}题目比较简单,借鉴了昨

2021-10-22 19:27:15 478

原创 LeetCode刷题日记(7. 整数反转)

7.整数反转int reverse(int x) { if (x == 0) return x; // 之所以单独处理这个是因为此时-x溢出了会报错 if (x == -2147483648) return 0; int neg, num; neg = x < 0 ? -1 : 1; num = x < 0 ? -x : x; int N = (int)log10(num) + 1; // 位数 int *arr = c

2021-10-21 22:50:27 292

原创 LeetCode刷题日记(4. 寻找两个正序数组的中位数)

4. 寻找两个正序数组的中位数double findMedianSortedArrays(int* nums1, int nums1Size, int* nums2, int nums2Size){ int length = nums1Size + nums2Size; int *arr= calloc(length, sizeof(int)); int i = 0, j = 0; while (1) { if (i < nums1Size &

2021-10-20 21:18:27 68

原创 LeetCode刷题日记(3. 无重复字符的最长子串)

3.无重复字符的最长字串int lengthOfLongestSubstring(char *s){ int hash[128] = { 0 }; int length = strlen(s); int maxLen = 0; int curr = 0; if (length <= 1) return length; for (int ii=0; ii<length; ii++) { for (int i=ii; i&lt

2021-10-19 17:50:34 138

原创 LeetCode刷题日记(写在开头自勉)

从今天开始,每天(至少)一道题全年无休,没有节假日,直到找到工作!我以前总是做的很快,想要在短时间内学会某个东西,可我现在觉得,慢一点会更快。学习贵在持之以恒,我觉得我可以一天刷十道题、二十道题,但是我没有可能这样坚持下去。每天一道就挺好,仔细研究细节、不会厌倦,将目光放到一年后、两年后,得到的积累与进步也将是十分可观了。...

2021-10-18 15:50:04 64

原创 LeetCode刷题日记(2. 两数相加)

2.两数相加答题思路:使用两个指针对输入的链表进行遍历,每次遍历后将结果保存在数组中,最后将数组中的值传入新建链表中。/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2

2021-10-18 15:32:09 160

原创 用C语言判断一个数的位数,并取出每个数字

这个方法是我在写C语言作业时想出来的简单写下直接求一个数的位数的原理,直接手写了知道了位数再求每个数字就比较好求了#include<stdio.h>#include<math.h>int main(){ int n; int N; int i; int a[10]; scanf("%d", &N);...

2018-05-10 12:58:34 18148 17

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除