+
Skip to content

szge/prep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prep

i learn to code in a way where my thought process can be inspected

how to run the code

e.g., u wanna run the code in notes/learncpp_com/ch2_intro_to_fns edit CMakeLists.txt in the root directory to add the necessary files, e.g.:

add_executable(ch2_intro_to_fns
    notes/learncpp_com/ch2_intro_to_fns/main.cpp
    notes/learncpp_com/ch2_intro_to_fns/add.cpp
)

then right click CMakeLists.txt to add the configuration if it doesn't already exist

20250401

day 1, spent hours figuring out how to get c++ intellisense to work on my mac but it wasn't cooperating. at least for now I'll probably won't run my solutions here.

I learned that two pointers are potentially useful when searching for a pair of elements in an array.

20250402

solved the "trapping rain water" neetcode which was apparently a "hard". I was thinking about the solution in my head all day and it took only 5 minutes to code out the solution which was not that hard.

20240502

haven't updated log in a while but I learned about the slow and fast pointer approach for linked lists, and creating a dummy head is often smart when dealing with deleted heads.

20240504

damn, I learned about the tortoise and hare algorithm for linked lists, and how they can be used to detect the start of a cycle. this is used in the find duplicate number problem. I also learned that you can delete a node from a linked list given a reference in o(1) time without needing to search through the list. you simply copy the next into the current and delete next. holy shit

20240507

binary trees are cool, mostly intuitive

20240509

Different types of DFS: pre-order, in-order, post-order apparently in-order for tree de/serialization is invalid since it doesn't uniquely identify the tree

About

i learn to code in a way where my thought process can be inspected

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载