3 min read
leetcode: my solutions

i really don’t know where to start at this point, but i will do my best to make sure i connect all my leetcode solutions the best way possible for you to use. i know i suck at teaching but at this point, i do it better.

i promise, i am not crazy!

as much as it was starting to make sense, when i solve leetcode problems, i do my best to keep it with the simplest approach i can think of. over time, i have solved about 300 leetcode problems and over the next 3 months, i intend to solve atleast 2 hard problems everyday. even though i have research work to complete during this time, but i will make sure to.

my leetcode solutions

i solved the basic calculator problem too

i was thinking i should evaluate the expression while respecting the operator precedence and parentheses...


i solved the skyline problem

the plan was to find the "critical points" of the skyline, where either a building starts, ends, or changes height...


problem 214: finding the minimum characters needed

what i did to solve this was first to reverse the string to identify how much of it matches from the beginning...


solved word search ii the simplest way possible

what i did was to build a trie from the list of words to allow quick prefix matching...


problem 127: word ladder solution

to solve this problem efficiently, we can use the breadth-first search (bfs) algorithm. bfs is suitable here because it explores all possible transformations level by level, ensuring that we find the shortest path to the target word....


solution for problem 2881

the operation of adding a new column involves iterating over each row of the DataFrame once, so its time complexity is O(n), where nn is the number of rows in the DataFrame...


solution for problem 28880

first, when filtering the dataframe, the filtering operation scans through the entire dataframe once, so its time complexity is O(n), where nn is the number of rows in the dataframe....


fuck this mehn! i know i would have to solve all problems in 3 months!