- 博客(12)
- 收藏
- 关注
原创 ubuntu18.04安装matlab2021b
ubuntu18.04安装matlab2021b出现问题安装好之后其他功能都正常,但是不能打开matlab coder,显示问题:Inconsistency detected by ld.so: ../elf/dl-tls.c: 597: _dl_allocate_tls_init: Assertion 'listp != NULL' failed!查了一下是glibc的bug,有如下方法可以打补丁https://github.com/mathworks/build-glibc-bz-19329-
2022-01-12 10:06:22
2077
原创 OPENPOSE ubuntu18.04
OPENPOSE ubuntu18.041 安装CUDA和cuDNN分别安装了CUDA10.0和cuDNN7.3.02 安装openCV版本为3.2.03 安装caffe
2021-04-16 15:40:24
213
原创 双指针
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* getKthFromEnd(ListNode* head, int k) { ListNode* .
2021-03-02 10:38:51
124
原创 20210130数组类算法
class Solution {public: void moveZeroes(vector<int>& nums) { int n=nums.size(); int i=0; while(find(nums.begin(),nums.end(),0)!=nums.end()) { auto pos=find(nums.begin(),nums.end(),0); .
2021-02-22 17:52:14
124
原创 2021-01-18 c++STL
数组class Solution {public: vector<int> findDisappearedNumbers(vector<int>& nums) { vector<int> ans; for(auto i:nums) { int pos=abs(i)-1; if(nums[pos]>0)nums[pos]=-nums[pos];
2021-01-22 22:31:55
128
原创 学习笔记数组--12.1
28. 实现 strStr()暴力解法O(m*n)class Solution {public: int strStr(string haystack, string needle) { int n=haystack.length(); int m=needle.length(); if(n==0&&m!=0)return -1; if(m==0)return 0; int i=0,j=0;
2020-12-01 16:40:59
162
原创 学习笔记数组--1119
56. 合并区间class Solution {public: vector<vector<int>> merge(vector<vector<int>>& intervals) { vector<vector<int>> ans; sort(intervals.begin(), intervals.end()); int n=intervals.size();
2020-11-19 17:58:59
224
原创 学习笔记--栈1106
155. 最小栈class MinStack {public: /** initialize your data structure here. */ stack<int> x_stack; stack<int> min_stack; MinStack() { min_stack.push(INT_MAX); } void push(int x) { x_stack.pus
2020-11-06 14:39:03
210
原创 学习笔记--链表8.17
142.环形链表②(一开始没反应过来总是觉得两者总是在环入口处相遇,没有将fast=fast->next)class Solution {public: ListNode *detectCycle(ListNode *head) { if (head == NULL || head->next == NULL) {return NULL;} ListNode* slow = head; ListNode* fast = hea
2020-08-17 22:09:26
179
原创 学习笔记--链表8.14
83. 删除排序链表中的重复元素/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* deleteDuplicates(ListNode* head) { i
2020-08-14 19:56:07
341
原创 洛谷P1000 超级玛丽游戏----c++中换行输出
P1000 超级玛丽游戏题目如下打印如下块 ******** ************ ####....#. #..###.....##.... ###.......###### ### ### ........... #...# #..
2020-08-08 15:25:13
325
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人