shortcut to compile & run current cursor file
[NOTE] C:\Users\ander\AppData\Roaming\Code\User\keybindings.json
"key": "ctrl+'"
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 修饰指针
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
code
1. basic - ctrl+c发送信号
signal(SIGINT, sigint_handler)
code
2. 向特定thread 发送signal
pthread_kill(tid1, SIGQUIT))
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)
🔥
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
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
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
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
code
twosum
code
intersection
code
isHappy
code
FourAddingEqualZero.cpp
code
ransomLetter.cpp
code
threeSum
code
LongestHarmoniousSubsequence - 成员差别小于等于1的最长子数列
code
rotten fruit
TODO
code
permutation of string s
code
n and k, return combination from 1 to n, size k
code
clean robot
将二进制数某一位变为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
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
code
recursivly del 2 adjacent dup element
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
code
python basic
code
recusive print list
code
using super to call the function in superclass(父类)
code
模拟车辆遇到十字路口的行为
code
longestStrChain.cpp
TODO
code
using read4 api to implement read N characters
important
code
likely, unlikely, throw exception
code
c++ iterator