venkats sample algorithms code