Skip to content

Instantly share code, notes, and snippets.

View nbdd0121's full-sized avatar

Gary Guo nbdd0121

View GitHub Profile
impl Solution {
pub fn word_break(s: String, word_dict: Vec<String>) -> Vec<String> {
fn helper<'a>(
answer: &mut Vec<String>,
current: &mut Vec<&'a str>,
str: &str,
dict: &'a [String],
) {
if str.is_empty() {
answer.push(current.join(" "));
@nbdd0121
nbdd0121 / stop-leak.ps1
Created September 28, 2021 20:28
"Stop" DWM from leaking memory
Get-Process | Where-Object {($_.Name -eq 'dwm' -and $_.PagedMemorySize64 -gt 2147483648) -or ($_.Name -eq 'YourPhoneServer' -and $_.PagedMemorySize64 -gt 1073741824)} | ForEach-Object {$_.Kill()}
@nbdd0121
nbdd0121 / Makefile
Last active February 9, 2022 16:49
Archive member selection
run: main
./main
a.o: a.c
gcc $^ -c -o $@
b.o: b.c
gcc $^ -c -o $@
foo.a: a.o b.o