Skip to content

Instantly share code, notes, and snippets.

View JaharshKotha's full-sized avatar

Jaharsh Samayan JaharshKotha

View GitHub Profile
@JaharshKotha
JaharshKotha / Checking Symmetry
Last active October 19, 2017 21:35
This is a very special problem to me because it is one of the first problems where I realized how to use the power of recursion to my advantage . As you can see it is a pretty small and elegant code that runs in O(n) time and does the job it needs to do in a perfectly efficient way.
//A simple and efficient program that check's if a binary tree is symmetrical (i.e) if one side is the mirror reflection of another .
class Tree {
public boolean checkSymmetric(TreeNode root) {
//An helper function that keeps track of my left and right subtrees.
return help( root, root);
}
public static boolean help(TreeNode left,TreeNode right)
{
@JaharshKotha
JaharshKotha / DV_90 pitch
Created November 30, 2016 05:00
DV_90 pitch
The Research questions we are tyring to address : Can the correlation btwn tags be analyzed from a novel perspective , can we sucessfully model the
correlation between tags using a new approach.
We contructed a simple comparision interface to study and analyze two different perspectives on the same problem.
The left side of the tool shows us the visualization of a traditional text min alg, used to find highly correlated tags and their relation
with others.Implemented using the K means on the value of cor- coeff ,
Right side shows a unique algorithm that we came up , it shows the co-relation between tags based on user interaction . COnstructed by
parsing the entire data set and finding number of users who haveactively participated on two or more tags.