upload to gh

This commit is contained in:
specCon18 2024-05-15 16:59:36 -04:00
parent d9d8d06b8a
commit f2407a9587
33 changed files with 941 additions and 83 deletions

16
src/day1/BTInOrder.ts Normal file
View file

@ -0,0 +1,16 @@
function walk(curr:BinaryNode<number> | null, path:number[]): number[]{
//Base Case
if(!curr){
return path;
}
//Recurse
walk(curr.left, path);
path.push(curr.value);
walk(curr.right, path);
//Post
return path;
}
export default function in_order_search(head: BinaryNode<number>): number[] {
return walk(head,[]);
}