ALGORITHM July 14, 2022

Apply Sliding Window technique with Two Pointers

Words count 4.3k Reading time 4 mins.

Motivated by my successful solution to the “Longest Substring Without Repeating Characters” problem on Leetcode, I eagerly present the “Sliding Window” technique, a simple yet intriguing method that leverages two pointers to achieve optimal performance.

Read article

ALGORITHM June 29, 2022

KickStart Practice #2: Building Palindromes

Words count 14k Reading time 13 mins.

Palindrome string is one of the problems always presents in Interview or Competitive Programming. Google Kick Start has launched there practice session in four days, included Building Palindromes.

Read article

ALGORITHM December 27, 2021

Shuffle strategic for limited resources

Words count 14k Reading time 12 mins.

On the early stage of Machine Learning, Data Mining progress, one of the problems we have to deal with processing large-size file, including corpus shuffle, usually its size would be larger than our limited resources like memory or capacity. Let’s say, the file is 30GB, whereas the provided memory is 8GB or 16GB, we surely cannot load entire them to memory in term of resource shuffling distribution notion. Therefore, the strategic tends to serve ...

Read article

ALGORITHM September 03, 2021

Tìm trung vị của 2 dãy đã được sắp xếp

Words count 16k Reading time 14 mins.

Cho hai dãy nums1, nums2 đã được sắp xếp theo thứ tự có size là mn, hãy tìm trung vị (median) của hai dãy đó.

Đây là bài toán được xem là mức độ khó trên, thách thức của bài này là thuật toán phải được chạy với time O(log(m+n))

Read article