5 ways reduce image size to speed up website

resize image feature

Introduction When traveling, most people take picture using the smart phone. The pictures’ dimensions are 3600 x 2400 pixels or higher. The file size is more than MB, or even GB. When you upload the images to the website, it will slow down the page loading because the image size …

Continue reading

Adapting to change in the time of COVID -19

adapt COVID-19

I haven’t made videos for more than a year. I am determined to make this video different. This is the first time I didn’t write the script before shooting the video. I just press the record button,  let my thoughts flow,  express the actions of adapting to change. COVID-19 has …

Continue reading

Build hierarchy tree tutorial

build hierarchy tree tutorial

Backstory: Build hierarchy tree tutorial teaches how to build a hierarchy tree from the employee list and their manager ids. The solution uses recursion. This is Amazon’s question for software engineer position. Why I picked this question: This is a question you cannot solve in 30 minutes (if you didn’t …

Continue reading

Find shortest and 2nd shortest path using Dijkstra tutorial

shortest path using Dijkstra tutorial

Backstory: Find shortest and 2nd shortest path using Dijkstra tutorial extends the use of Dijkstra algorithm, and solve find the 2nd shortest path problem. Dijkstra algorithm is on the list of must-know algorithms for Google, Amazon and Facebook. Why I picked this question: This is the third tutorial of my …

Continue reading

Find K closest points to center tutorial

Find k closest points to center tutorial

Backstory: Find K closest points to center tutorial explains how to use PriorityQueue to solve the question. There are multiple ways to solve Find K closest points to center. This tutorial focuses on the solution using PriorityQueue in Java, because it is the easiest. Meanwhile, Euclidean distance in introduced to …

Continue reading

Shortest path in matrix tutorial

Shortest path in matrix tutorial

Backstory: A matrix is a 2D array, an extension of an array. Meanwhile, matrix is one of the representation of graph, known as “Adjacency Matrix”. Shortest path in matrix tutorial explains how to use breath first search (BFS) to print the shortest path between two cells in matrix. Why I …

Continue reading

Find distinct palindromic substrings with suffix trie tutorial

distinct palindromic substrings suffix trie tutorial

Backstory: Find distinct palindromic substrings using suffix trie is one of the Amazon interview question. The tutorial gives a solution using suffix trie. Meanwhile, the tutorial also provides the implementation of suffix trie. Why I picked this question: Trie, suffix trie, suffix array and suffix array are new data structures …

Continue reading

Convert prefix to postfix tutorial

Convert prefix to postfix tutorial

Backstory: Convert prefix to postfix tutorial provides 2 solutions to convert – stack and recursion. The binary tree traversal in an example to use both both stack and recursion to solve. This is another example how to use one or another in interview. Why I picked this question: I want …

Continue reading

Find occurrences using binary search tutorial

Count occurrence in sorted array tutorial

Backstory: Find occurrences using binary search tutorial introduces binary search, which can improve the complexity significantly in sorted array questions. However, you have to take care and test the edge cases. Why I picked this question: Binary search is very popular algorithm in computer science. The interviewers like to ask …

Continue reading

Log analyzer using regular expression tutorial

log analyzer with regular expression tutorial

Backstory: Log analyzer using regular expression tutorial explains how I wrote a customized log analyzer for company specific tasks. It counts the number of error messages in the log. In sum, Regular expression is essential for this approach. Why I picked this question: Find out the error messages and theirs …

Continue reading