LeetCode Cookbook

Abstract
This book is for the programming enthusiasts who want to improve algorithm capabilities through LeetCode. The algorithms in this book are all implemented in Go language. The code is placed in the github repo, and the topic can be searched by the question number. The code for the leetcode problems in this book has beats 100%. Without the beats 100% solution, it would not be included in this book. The author will continue to optimize those topics to 100% before putting them in.
Readers may ask, why pursue 100% beats. The author thinks that optimizing to 100% beats can be considered as a master for this question. There are several Hard questions, the author has used violence to solve AC, and then only beats 5%. This question is as if not done. And if such an answer is given in the interview, the interviewer will not be satisfied, “Is there a better solution?” If you can give a better solution through your own thinking, the interviewer will be more satisfied. Of course, if there are other more beautiful solutions that can beats 100%, please submit a PR and I will learn with you.
Type
Publication
LeetCode Cookbook
publication
Dezhi Yu
Authors
Senior ML Engineer

I am a research-oriented machine learning systems engineer working on foundation model infrastructure, alignment, and evaluation. My work focuses on building efficient, reliable systems for large language models while studying the algorithms and data choices that make these models more useful, controllable, and cost-effective in real applications.

At TikTok, my recent work centers on Model-as-a-Service platforms and high-performance LLM inference. I develop serving infrastructure with vLLM and SGLang across model runtime integration, scheduling and continuous batching, KV-cache and memory management, distributed execution, observability, and reliability. This systems work is closely connected to my research on distributed disaggregated inference, preference optimization, instruction-tuning data selection, multimodal evaluation, and retrieval-augmented biomedical summarization.

My broader research spans reinforcement learning for robotics, healthcare sequence modeling, privacy-preserving machine learning, and motion planning. I am especially interested in model-system co-design: how model architecture, inference algorithms, data curation, hardware utilization, scheduling, and distributed runtimes interact. My goal is to advance frontier AI systems that are faster to experiment with, more rigorous to evaluate, and dependable enough to serve at scale.