Skip to content

LeetCode Note Directory

Last Updated on 2023-12-18 by Clay

Writing At The Beginning

What is LeetCode?

LeetCode is a website that collects many kinds of programming questions. Although there are various questions, they are generally oriented to "Whiteboard Interview"; In other words, many programmers who repeatedly solve the questions on LeetCode.

Of course, I also hope I can practicing on LeetCode and help myself to be successful in the interview. I will record my thoughts and practices when solving the questions here as a reference.


The Metrics of Question-solving

There are two very obvious indicators for solving questions in LeetCode:

  • The RUNTIME we used
  • The MEMORY SPACE we used

And the presentation methods of these indicators are compared with other uses who submitted before.

But case by case, I feel that these two indicators are just a reference, and do not be too attached to them. After all, sometimes, there are times when the execution efficiency is very fast, but the memory usage is very large; on the contrary, there are also examples where the execution efficiency is not the fastest, but it can save a lot of memory usage space.

Which architecture to use depends on the needs of programming.

In addition, there is also the problem of "readability". If there is no bottleneck in time complexity and space complexity in the code of a product today, and there are subsequent handovers scheduled... should we sacrifice readability?

The above examples are a bit biased, but I think the so-called "optimizing the most expensive resources" is exactly what it is! The most expensive resources may change in different time and space backgrounds.

What is valuable is, the "problem-solving thinking ability" that has been slowly exercised in the long process of solving problems.

Share it with you, who want to make progress together.


List

Tags:

Leave a ReplyCancel reply

Exit mobile version