ALL POSTS

The Master Theorem For Time Complexity

In this article, we will model the time complexity of divide and conquer using mathematical methods, analyze its asymptotic properties, and provide three methods of calculation.

18 Dec, 2023
ALGORITHMMATHEMATICSCOMPUTATION

The Bash Game

A pile of stones, two people take turns to take at least 1 stone and at most 2 stones. Whoever gets the last stone loses.

14 Dec, 2023
ALGORITHMGAME-THEORY

Fast Inverse Square Root

Magic Number - 0x5f3759df

The article introduces an algorithm called Fast Inverse Square Root, which is used to quickly calculate the inverse square root of a floating point number.

8 Dec, 2023
MATHEMATICSALGORITHM

送東陽馬生序

余朝京師,生以鄉人子謁余,譔長書以為贄,辭甚暢達;與之論辯,言和而色夷。自謂少時用心於學甚勞,是可謂善學者矣。其將歸見其親也,余故道為學之難以告之。謂余勉鄉人以學者,余之志也;詆我夸際遇之盛而驕鄉人者,豈知予者哉。

7 Dec, 2023
文史哲艺古文整理

How Do Computer Calculate the Log-Function

Take the Glibc's Mindset for Example
7 Dec, 2023
ALGORITHMMATHEMATICS

Moore's Voting Algorithm for Finding Majority Element

Moore's Voting Algorithm is an algorithm used to find the element that appears more than half the time in an array.

2 Dec, 2023
ALGORITHM

A Star Algorithm

A* search algorithm is a path finding algorithm that finds the single-pair shortest path between the start node(source) and the target node(destination) of a weighted graph.

24 Nov, 2023
ALGORITHM

The Knuth Shuffle Algorithm

The Knuth Shuffle algorithm (also known as the Fisher-Yates Shuffle) generates all possible permutations with equal probability.

23 Nov, 2023
ALGORITHM

Rabin-Karp Algorithm

It is designed to address the multiple pattern string matching problem.

22 Nov, 2023
ALGORITHM

Joseph Circle Problem

A description, analysis and solution for joseph circle problem.

21 Nov, 2023
ALGORITHM
/ 9