5 ways to request and parse data from Internet

web scraping tutorial

Internet is the great resource to get information. You can request and parse data for study, business or hobby. There are many ways to send request and retrieve data from Internet. All programing languages provide the libraries to do so using different network protocols. Afterwards, you need process them. There …

Continue reading

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

10 Eclipse settings you must know for Java development

eclipse settings

Top 10 eclipse settings are: 1. Open the Exiting Projects 2. Red sign on Project in Package Explorer 3. Change System Library 4. Run JUnit 5. Import External JARs 6. Turn on Autosave 7. Run with Arguments 8. Find the Command Line to Run the Program 9. Upgrade Eclipse to …

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

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

Word break using memoization tutorial

word break tutorial

Backstory: Word break tutorial explains how to use memoization to solve word break problem. Memoization is one of the dynamic programming technique. After applying memoization, the complexity reduces from exponential level to O(n^3). Why I picked this question: It is intimidating to study Dynamic programming. Actually dynamic programming is not …

Continue reading

Autocomplete with trie tutorial

autocomplete with trie tutorial

Backstory: Autocomplete with trie tutorial teaches how to implement trie and use it to solve automcomplete problem, a popular interview question. This is a question from Amazon for software engineer position. The interviewer specifically asks to use trie. Why I picked this question: When I studied Computer Science in college …

Continue reading