Skip to content

Instantly share code, notes, and snippets.

View pradipto87's full-sized avatar

Pradipto Biswas pradipto87

View GitHub Profile
@pradipto87
pradipto87 / cd_fun.sh
Created October 19, 2018 12:37
cd function
# This function defines a 'cd' replacement function capable of keeping,
# displaying and accessing history of visited directories, up to 10 entries.
# To use it, uncomment it, source this file and try 'cd --'.
# acd_func 1.0.5, 10-nov-2004
# Petar Marinov, http:/geocities.com/h2428, this is public domain
cd_func ()
{
local x2 the_new_dir adir index
local -i cnt
@pradipto87
pradipto87 / cpp
Last active January 11, 2018 07:14
Large Non-negative Integer Multiplication using Karatsuba algorithm
#include<iostream>
#include<string>
#include<cstring>
using namespace std;
void trim(string &str)
{
while(!str.empty() && (str[0] == '0'))
str.erase(str.begin());
}
int makeEqualLength(string &str1, string &str2)