Home

23Jun2022: CS50, Leetcode

Created June 23, 2022

Today I was watching/studying from the CS50 Harvard course on edX - classic course everyone talks about studying. It starts with writing programs with scratch and then translating them into C - so far in the lecture at least. It's nice to see some of these basic programs written in C since I've only been programming in JavaScript or Python. It's also nice to see certain features, like how in JavaScript you don't have to declare the function at the top like you do in C.

I also continued to work on this pivotIndex function which seemed to work for the edge cases I was writing about yesterday, but went into a super long loop for one of the test cases so I decided to try a different way to solve it. I thought I had nailed it but when it started taking forever to test the cases...in any case it's very bad big O anyway because I have 3 for loops in it basically. I will try another way to solve it.

Catt