原创 917. 僅僅反轉字母 Reverse Only Letters

題目 https://leetcode-cn.com/problems/reverse-only-letters/ char * reverseOnlyLetters(char * S){ if(S == NULL)

原创 1089. 複寫零 Duplicate Zeros

題目 https://leetcode-cn.com/problems/duplicate-zeros/ void duplicateZeros(int* arr, int arrSize){ int* arr_tmp = mallo

原创 537. 複數乘法 Complex Number Multiplication

題目 https://leetcode-cn.com/problems/complex-number-multiplication/submissions/ char * complexNumberMultiply(char * a,

原创 150. 逆波蘭表達式求值 Evaluate Reverse Polish Notation

題目 https://leetcode-cn.com/problems/evaluate-reverse-polish-notation/ 指針棧 #include <stdio.h> #include <stdlib.h> struc

原创 143. 重排鏈表 Reorder List

題目 https://leetcode-cn.com/problems/reorder-list/ void reorderList(struct ListNode* head){ struct ListNode *h1=NULL,*

原创 B樹 寫文件

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <fcntl.h> #define max(a,b) ((a)

原创 114. 二叉樹展開爲鏈表 Flatten Binary Tree to Linked List

題目 https://leetcode-cn.com/problems/flatten-binary-tree-to-linked-list/ /** * Definition for a binary tree node. * s

原创 Go HTTP 轉發

package main import ( "log" "net/http" //"sync" "io" ) func init() { log.SetFlags(log.Ldate | log.Lmicroseconds

原创 Python list 不夠 賦值

有個需求,就是數據通過|組合,發給對方。但是每當對方更改文檔,要求更多字段,而我這邊沒有及時更新,導致數據發給對方沒通過。 估計對方是split,獲得list,然後 [0] [1] ...這樣賦值。 我的一個思路,list轉dic fr

原创 go struct 與 []byte 的幾個轉換

package main import ( "fmt" "unsafe" ) type Person struct{ name [10]byte age int } type SliceMock struct {

原创 Go tcp 端口轉發

package main import( "fmt" "net" "io" "sync" "time" //"context" ) func main(){ listener, err := net.Listen("tc

原创 876. 鏈表的中間結點 Middle of the Linked List

題目 https://leetcode-cn.com/problems/middle-of-the-linked-list/submissions/ /** * Definition for singly-linked list.

原创 106. 從中序與後序遍歷序列構造二叉樹 Construct Binary Tree from Inorder and Postorder Traversal

題目 https://leetcode-cn.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/submissions/ //Definiti

原创 102. 二叉樹的層次遍歷 Binary Tree Level Order Traversal

題目 https://leetcode-cn.com/problems/binary-tree-level-order-traversal/submissions/ #define max(a,b) ((a)>(b)?(a):(b))

原创 貪吃蛇

寫個貪吃蛇的Demo,只有蛇 #include <stdio.h> #include <time.h> #include <string.h> #include <signal.h> #include <stdlib.h> #inclu