Leon Dong

Curiosity Drives Innovation, Innovation Nurtures Progress.

A List of Interesting LeetCode Problems

This post contains a list of LeetCode problems that I found interesting during my time practicing Data Structures and Algorithms (DSA) questions and..


The Art of Support Vector Machines - Part I

Support Vector Machines (SVMs) stand out as an exceptionally elegant model that has captivated me over the years. Although it is not widely employed..


Smallest Perfect Square Number that Modulo K

In this post, I am going to discuss an algorithm for finding the smallest $x$, such that $x^2 \mod K = 0$. This is actually a sub problem of le..


Combinatorics and Modular Multiplicative Inverse

In this post, I will dive into a hard question that involves combinatorics, modular operations of the division among two large numbers. The original..


Hexo添加代码片段复制功能

本文主要介绍如何给自己的Hexo博客内的代码片段添加“全部复制”的功能,这样可以很好的方便自己或者别人来对代码进行实验,并在此基础上改进。目前网上已经有较多的解决方案了,不过很多都是限定主题的(例如Next主题)。经过一番仔细搜索,我发现有些博主提供方案还是很通用的,在理解大致原理的基础上稍作修..


Offline Policy Evaluation in Large Action Space

In this article, I present a comprehensive literature review of existing research works on Offline Policy Evaluation (OPE). I have incorperated a lo..


Find Majority Element in Linear Time

Problem DescriptionInput: an array of elements with size $N​$, and there exists an element $M​$ accounts for more than 50% of the array (called Majo..


Understanding the Pointers Advanced

IntroductionThis blog is the second one that talking about the pointers. In the previous one, I talked about what is the pointer and why the type of..


Speedup the Binary Search

IntroductionBinary search is known as the fastest search algorithm on a sorted array. Though it works pretty good in most cases, the performance und..


Understanding the Pointers in C/C++

IntroductionPointers are most frequently used variable type in programming languages like C/C++. In this blog, I want to share my understandings abo..