Skip to content

shawnluo/test_git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shortcut to compile & run current cursor file

[NOTE] C:\Users\ander\AppData\Roaming\Code\User\keybindings.json "key": "ctrl+'"

c & Linux system基础

1 code fgets())
2 code pipe())
3 code fifo()) mkfifo
4 code popen())
5 code 函数作为参数被传递
6 code strtol
7 code max_element(nums.begin(), nums.end())
8 float     占4个字节,要加f, eg. 1.2f
double 占8个字节
code lower_bound(x): 大于或等于x的数的指针
upper_bound(x): 大于x的数的指针
code const 修饰指针

terminate a thread

code c++ multithreading
code pthread_exit 用来终结自己所在线程
code pthread_cancel
code pthread_kill
code 根据线程名,使用pthread_cancel来中断线程 prctl, pthread_cancel, c++
sem_init(), sem_wait(), sem_post()
pthread_mutex_lock(), pthread_mutex_unlock
code detach

signals

code 1. basic - ctrl+c发送信号 signal(SIGINT, sigint_handler)
code 2. 向特定thread 发送signal pthread_kill(tid1, SIGQUIT))

system design

code 生产者消费者。使用 lock 来保证共享资源的互斥。使用 sem 来保证线程间的同步。
code c++写一个类,实现startCaller和stopCaller两个API,
startCaller(), 要求输入待执行函数的函数名和执行频率
stopCaller(), 停止指定函数的循环执行。
code multiple threading - c
code multiple threading - c++
c++实现一个接口类,实现不同总线调用。spi/uart 🔥 TODO
code 380. Insert Delete GetRandom O(1) 🔥

c++

code important TODO
code cpp_class
code pure virtual function
code vector vs list
code vector
code pair
code lambda
code operator overloading
how to use find
code map
code set/unordered_set
code static_cast/dynamic_cast
code std::deque
code priority_queue
code API - isdigit/isalphy
code copy constructor - deep copy vs shallow copy
string to char
accumulate(v.begin(), v.end(), 0)
code smart pointer - unique_ptr/shared_ptr/weak_ptr
code implicit/explicit

二分法

code Search Insert Position

dp

code 0-1 knapsack
complete knapsack
code longest_increasing_nums 非连续
code longest_Increasing_nums consectively 连续
code 最长回文子序列 dp53
code 最长回文子串
code 多少个子串 dp52
code 将string s换成string t,所需要的最少操作数 dp50
code dp49 两个字符串的删除操作:找到使得s和t相同,所需要的最少步数
code dp48 求在s的子序列中,t出现的次数 todo
dp48.1 求在s的连续子序列中,t出现的次数 - KMP todo
code dp47 判断子序列
code leetcode 673 find Number Of LIS 最长递增子序列的个数
code 740. Delete and Earn

linked list

code linked list class design with template
code reverse
code reverse II
code create LL
code partition list 链表局部排序
code delete duplicated elements
[code] swap adjacent element
linked list adding

array

string combination
code findMedianSortedArrays.cpp
code strstr - kmp
code meeting room
code meeting room 2
code spiral mat
code rotate mat
code find island
code is rectangle todo
code delete duplicated elements in an array
code jump game
code blur pixels
code len of sorted element, remove repeat elements
code min sub array Len 长度最小的子数组
code implement pow
code remove the duplicated elements in an array
code 2610. Convert an Array Into a 2D Array With Conditions
code 2870. Minimum Number of Operations to Make Array Empty
code sort vector<vector> v

string

code reverse words
palindrome
code longest palindrome
code remove extra spaces
reverse words in a sentence
code longest uniq sbustring
code leet 409 最长可组成的回文
code atoi 字符串转整数
code strtok
code sort by frequncy 一串string,按频率输出,相同频率按string字母顺序
code string to int
code isalnum: letters and numbers
isdigit:    numbers
isalpha:   letters

hash

code twosum
code intersection
code isHappy
code FourAddingEqualZero.cpp
code ransomLetter.cpp
code threeSum
code LongestHarmoniousSubsequence - 成员差别小于等于1的最长子数列

binary tree

code insert node
delete node todo
code reverse
code dfs/bfs

backTracking

code rotten fruit TODO
code permutation of string s
code n and k, return combination from 1 to n, size k
code clean robot

bitswise

将二进制数某一位变为1  int res = num| (1 << n)
将二进制数某一位变为0  int res = num & ~(1 << n))
code reverse integer
code print a number in binary form - bitset<16>(num)
code set all 1 or 0 mask from start to end
code determine the number of bits required to convert integer A to integer B
code swap odd and even bits in an integer
code print bits binary
code Bitwise AND of Numbers Range
code endianness swap
code 201. Bitwise AND of Numbers Range
code nibble value
code get Complement Of Two without using +, -, *, /
code find missing number in a array
code using bitwise XOR operator to find the odd occurring(奇数次出现)number in an array
code decimal to binary

IPC

code semaphore
code pthread_cond_wait

sorting

code sort, qsort
code quick sorting - partition important
code find nth element in array
code using stack to sort array
code finds an element in rotated array
code merge intervals important
code insert intervals important

stack

code recursivly del 2 adjacent dup element

embedded

code aligned malloc
code memory copy / string copy 🔥very important
code little ending
code decimal <-> binary 🔥important
code count ones - bit count
code define micro

cracking the code

code
answer

interview questions

code

python

code python basic
code recusive print list
code using super to call the function in superclass(父类)
code 模拟车辆遇到十字路口的行为

others

code longestStrChain.cpp TODO
code using read4 api to implement read N characters important
code likely, unlikely, throw exception
code c++ iterator

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published