Home
Yanshi XU
Cancel

Trie Tree

Trie is a type of k-ary search tree used for storing and searching a specific key from a set. Using Trie, search complexities can be brought to optimal limit (key length). Definition A trie (...

LeetCode Weekly Contest 336

Contest 1. Q1 Question(Easy) You are given a 0-indexed array of string words and two integers left and right. A string is called a vowel string if it starts with a vowel character and ends with...

KMP Algorithm

Pattern searching is an important problem in computer science. When we do search for a string in a notepad/word file or browser or database, pattern-searching algorithms are used to show the search...

Disjoint Set Data Structure

What is a Disjoint set data structure? Two sets are called disjoint sets if they don’t have any element in common, the intersection of sets is a null set. A data structure that stores non overlap...

程序员学英语

(全文转载自jdhao’s digital space) 找海外工作很重要的一个要求语言过关,根据国家的不同,对语言的要求也不同,英语国家当然英语就足够了,有的欧洲国家公司还会要求你掌握当地语言,如果你不会,那投递简历时就可以跳过这些公司了。本文谈一谈我的英语学习经验,仅供参考。英语主要分为听说读写四个方面,下面就分开写一写我的经验。 听力 要提高听力,没有别的办法,就是要多听,就可以...

Heap Sort

Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to the selection sort where we first find the minimum element and place the minimum element at t...

Elementary Sorting Methods

Selection Sort Selection sort is a simple and efficient sorting algorithm that works by repeatedly selecting the smallest (or largest) element from the unsorted portion of the list and moving it t...

Application and uses of Merge Sort

Today is Jan 21, 2023. Happy Lunar New Year! 🐰 Merge Sort Merge Sort Template /* Preparation */ const int N = 1e6 + 10; int tmp[N]; // Extra space to store the elements. void merge_sort(int a...

Application and uses of Quick Sort

Quick Sort Quick Sort Template /* Preparation */ void quick_sort(int a[], int l, int r) { if (l >= r) { return; } int pivot = a[l], i = l - 1, j = r + 1; // Two Pointers(双指针) whil...

Arbitrary Precision Arithmetic

Definition In computer science, arbitrary-precision arithmetic, also called bignum arithmetic, multiple-precision arithmetic, or sometimes infinite-precision arithmetic, indicates that calculation...