Skip to content

Instantly share code, notes, and snippets.

View ajhanwar's full-sized avatar

Aditya Jhanwar ajhanwar

  • San Francisco, California, USA
View GitHub Profile
@ajhanwar
ajhanwar / joins.sql
Last active February 22, 2019 08:01
Solutions to the 'JOINS' exercises on SQLZOO.net
/*
* joins.sql
* 2/21/19
* Aditya Jhanwar
*/
-- 1.
select matchid, player from goal
where teamid = 'GER'
@ajhanwar
ajhanwar / SocialNetwork.sql
Last active February 5, 2019 08:23
My Solutions for Stanford Lagunita's 'Social-Network Query Exercises'
/*
* SocialNetwork.sql
* Aditya Jhanwar
*
* My solutions for Stanford Lagunita's SQL course, exercise section 'Social-Network Query Exercises'
* Feedback would be greatly appreciated!
* Please feel free to leave a comment below or you can reach me at ajhanwar@berkeley.edu
*/
-- Q1: Find the names of all students who are friends with someone named Gabriel.
@ajhanwar
ajhanwar / BST.py
Last active June 14, 2017 18:26
A simple implementation of a binary search tree in Python
class BinarySearchTree:
"""
A simple program implementing a Binary Search Tree using only the key values
Node for the BST is implemented as a private class for encapsulation
"""
class __Node:
def __init__(self, key):
self.key, self.left, self.right = key, None, None