This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kumar116; | |
public class Mergesort <T extends Comparable<T>> { | |
public void sort(T[] data) { | |
mergesort(data, 0, data.length - 1); | |
} | |
private void mergesort(T[] data, int low, int high) { | |
if (low < high) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kumar116; | |
/* @author Soumya Kumar | |
* (mathbits.com/MathBits/Java/arrays/InsertionSort.htm) | |
* | |
* @summary | |
* The insertion sort is fast and efficient with smaller arrays. It loses it's efficiency over large amounts of data. | |
*/ | |
public class InsertionSort<T extends Comparable<T>> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author: Emrul Chowdhury | |
#include <bits/stdc++.h> | |
#define LL long long int | |
using namespace std; | |
map <LL, LL> mp; | |
vector <string> v[2000005]; | |
vector <LL> v1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define SIZE 100000 | |
using namespace std; | |
string BigIntFibo (string a,string b) | |
{ | |
if (a.size()<b.size()) | |
{ | |
string temp=a; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner ; | |
public class sdz { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
System.out.println(squaroot(2,16,0.05)); | |
} | |
static double squaroot(int start, double number , double precision){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define MEM(a,b) memset((a),(b),sizeof(a)) | |
#define MAX(a,b) ((a)>(b)?(a):(b)) | |
#define MIN(a,b) ((a)<(b)?(a):(b)) | |
#define MIN3(a,b,c) MIN(MIN(a,b),c) | |
#define MIN4(a,b,c,d) MIN(MIN(MIN(a,b),c),d) | |
#define In freopen("In.txt", "r", stdin); | |
#define Out freopen("out.txt", "w", stdout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define MEM(a,b) memset((a),(b),sizeof(a)) | |
#define MAX(a,b) ((a)>(b)?(a):(b)) | |
#define MIN(a,b) ((a)<(b)?(a):(b)) | |
#define MIN3(a,b,c) MIN(MIN(a,b),c) | |
#define MIN4(a,b,c,d) MIN(MIN(MIN(a,b),c),d) | |
#define In freopen("In.txt", "r", stdin); | |
#define Out freopen("out.txt", "w", stdout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define MEM(a,b) memset((a),(b),sizeof(a)) | |
#define MAX(a,b) ((a)>(b)?(a):(b)) | |
#define MIN(a,b) ((a)<(b)?(a):(b)) | |
#define MIN3(a,b,c) MIN(MIN(a,b),c) | |
#define MIN4(a,b,c,d) MIN(MIN(MIN(a,b),c),d) | |
#define In freopen("In.txt", "r", stdin); | |
#define Out freopen("out.txt", "w", stdout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define MEM(a,b) memset((a),(b),sizeof(a)) | |
#define MAX(a,b) ((a)>(b)?(a):(b)) | |
#define MIN(a,b) ((a)<(b)?(a):(b)) | |
#define MIN3(a,b,c) MIN(MIN(a,b),c) | |
#define MIN4(a,b,c,d) MIN(MIN(MIN(a,b),c),d) | |
#define In freopen("In.txt", "r", stdin); | |
#define Out freopen("out.txt", "w", stdout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define MEM(a,b) memset((a),(b),sizeof(a)) | |
#define MAX(a,b) ((a)>(b)?(a):(b)) | |
#define MIN(a,b) ((a)<(b)?(a):(b)) | |
#define MIN3(a,b,c) MIN(MIN(a,b),c) | |
#define MIN4(a,b,c,d) MIN(MIN(MIN(a,b),c),d) | |
#define In freopen("In.txt", "r", stdin); | |
#define Out freopen("out.txt", "w", stdout); |
NewerOlder