Binary search is an efficient algorithm for finding an item from a sorted list of items. Here you will find several morphs with the source code.

Read MoreBinary search is an efficient algorithm for finding an item from a sorted list of items. Here you will find several morphs with the source code.

Read MoreGive a list of sorted numbers, delete all duplicates such that each element appear only once. Time complexity must be in O(n).

Read MoreGiven two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.

Read MoreThis project was developed while I taught the course Web and Database programming. The students work on the projects step by step, and eventually make it dynamically.

Read MoreDrupal is an open source platform for building amazing digital experiences, which SaskRCE Website is built on.

Read MoreReflection is an API which is used to examine or modify the behavior of methods, classes, interfaces at runtime. A class has multiple component…

Read MoreSorting is really important in software development. This article brings the four sort algorithms, which are Bucket Sort, Bubble sort, selection sort and quick sort.

Read MoreSGI Employee Portal, which is the most complex website that I built on the platform. It contains the news social features, sending internal messages, pushing notifications, etc.

Read MoreSaskatchewan driver’s licensing and vehicle registration website. It has 10,000 + visitors per day, which is a relative high-traffic website.

Read MoreHow often do we utilize our productive capital, productive capital being the equipment that we purchase for daily activities as individuals, businesses, governments, or universities?

Read MoreThis is the first project that I have been working on after I graduated from the University.

Read MoreThe duration of running the method is the execution time [Figure below]. In Java, there are plenty of methods to measure the execution time.

Read More1. Description Recursive way is based on computer program, the function calling stack. While iterative way is programmer use stack to simulate it. 2. Solution

Read More1. Description Design and Implement a data structure for LRU cache. It should support get and put. get(key) – Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.put(key, value) – Set or insert the value if the key is not already present. When the cache reached […]

Read More1. Description Given an integer, return its base 7 string representation. 2. Example 3. Solution 4. Complexity Time: O(n) Space: O(1)

Read More1. Description Asked by Google. Given a list of numbers and a number k, return whether any two numbers from the list add up to k. 2. Example Given [10, 15, 3, 7] and k of 17, return true, since 10+7 is 17. 3. Solution – 3 ways to solve it.

Read More1. Description Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, too. You need to find the shortest such subarray and output its length. Example 1: Input: [2, 6, 4, 8, 10, 9, 15] Output: 5 Explanation: […]

Read MoreApache Struts is a free, open-source, MVC framework for creating elegant, modern Java Web applications. This post introduces an app implement by Struts + Hibernate.

Read More1. Description Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit. Note that you cannot sell a stock […]

Read More1. Description Give a pattern and a string, and check if the string follows the pattern. 2. Example 3. Solution 3.1 Wrong solution First, I was thinking, if I can use the AscII code to represent the pattern. For example: hello -> ‘a’, and hello -> ‘a’, world -> ‘b’, world->’b’. Use the data structure […]

Read More1. Questions What’s the best/worst running time of Merge Sort? O(nlogn), O(nlogn) What’s the best/worst running time of Quick Sort? O(n), O(n^2) What’s the worst running time for a look up in a HashTable? O(n) two reasons: if too many elements were hashed into the same key: looking inside this key may take O(n) time; […]

Read More