Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tqn's full-sized avatar

Tej Qu Nair tqn

View GitHub Profile
@tqn
tqn / dijkstra.cpp
Last active September 6, 2023 12:17
Dijkstra's algorithm using a binary heap priority queue
#include <algorithm>
#include <memory>
#include <vector>
#include <unordered_map>
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
@tqn
tqn / maxflow.cpp
Last active December 12, 2016 07:35
USACO Platinum Problem #1 (http://usaco.org/index.php?page=viewproblem2&cpid=576) with time complexity O(n^2) (too slow)
#include <algorithm>
#include <ctime>
#include <fstream>
#include <iostream>
#include <limits>
#include <queue>
#include <string>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
@tqn
tqn / gitid
Last active December 20, 2015 22:02
Gets insertions and deletions from the initial commit.
#!/bin/bash
git diff --shortstat $(git rev-list HEAD | tail -n 1)

Keybase proof

I hereby claim:

  • I am tqn on github.
  • I am tej (https://keybase.io/tej) on keybase.
  • I have a public key whose fingerprint is 8D78 3F31 C97E 924D 9BE3 72E7 82CA 0E4B F5CB CB83

To claim this, I am signing this object:

Verifying I am +tejqnair on my passcard. https://onename.com/tejqnair