Skip to content

Instantly share code, notes, and snippets.

View v1k22's full-sized avatar
๐Ÿ˜€
Busy

Bhavik Dhandhalya v1k22

๐Ÿ˜€
Busy
  • India
View GitHub Profile
@v1k22
v1k22 / left_view_BST.cpp
Created May 21, 2019 13:24
Left View of Binary Search Tree [New approach]
/*
Problems:
https://practice.geeksforgeeks.org/problems/left-view-of-binary-tree/1
*/
/*
SAMPLE INPUT
1
8
5 4 7 1 2 8 9 10
@v1k22
v1k22 / pollard_brent.py
Created November 25, 2018 08:01
Comparison: Pollard vs. Brent Factorization algorithms
"""
Bhavik Dhandhalya
BITS Pilani, ME Computer Science batch 2020
"""
from fractions import gcd
from random import randint
import time
def f(x, c, n):
return (x ** 2 + c) % n