[Leetcode] Unique Paths II

[Problem Link] Total paths ending at [i, j] are Total paths ending at [i+1, j] + Total paths ending at [i, j+1]Total paths ending...

[Leetcode] Course Schedule II

[Problem link] What is topological sort? You simply keep picking nodes with no incoming edges (or with in-order 0). No valid solution? You might...

[Leetcode] Container With Most Water

[Problem Link] Use a typical 2 pointer approach to solve this problem. At step 1 assume your max container spans two ends. What is...

[Leetcode] Random Pick Index

Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target...

[Leetcode] Moving Average from Data Stream

Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. Example: MovingAverage m =...

Chemistry 101

Basic Information Number of protons in the element define the element. Neutrons can change, electrons can change, but if protons change you have a...

[Programming Problem] Inorder Successor in BST

Given a binary search tree and a node in it, find the in-order successor of that node in the BST. Note: If the given...

WordPress Backup

WordPress Import/Export Wordpress allows you to export your ‘content’ in xml format. it then allows you to imports that content in a wordpress instance....

Java Memory Managment

Here is a basic summary of all available garbage collectors. Collector Block the world (minor) Block the world (major) Threads (minor) Threads (major) -XX:+UseSerialGC...

Http Basic Authentication

Here’s a brief overview of Http Basic Authentication which is a (trivial) way of providing authentication in your application. Every-time you send a http...