Categories
Algorithms

Quick Sort

This class implements a QuickSort algorithm using Hoare Paritioning scheme. This partitionining scheme is slightly harder to implement but is more efficient than the Lamuto partitioning scheme. Avg Time-Complexity: O(nlogn) Worst Time-Complexity: O(n^2) Space complexity: O(1) Implementation in Java Unit Testing Now test a few cases and see if the implementation passes all of them […]

Categories
Uncategorized

Merge Sort (Draft)

Categories
Algorithms

LeetCode#94: Binary Tree Inorder Traversal

First check out the problem description here on LeetCode. The Solution This is marked as a medium difficult problem. However if you know what in-order traversal does, it is a very simple problem. Here I just added a helper traverse() method. All the trick is done in the few lines inside the function. It checks […]

Categories
Algorithms Data Science

Policy Iteration, Value Iteration, and Q-Learning

Quick introduction to basic Reinforcement Learning algorithms including Bellman Equation, Policy Iteration, Value Iteration, and Q-Learning

Categories
Algorithms OMSCS

How To Compute Reconstruction Error for Random Projection

Random Projection is an interesting Dimensionality Reduction technique. You may choose to create a random projection for 1,2,3,..,n dimensional projections. Now how to tell which one is best? So you would need to calculate loss of data due to this reduction in data size. # data has this shape: row, col = 4898, 11 random_projection […]