Skip to content

Instantly share code, notes, and snippets.

View MinhasKamal's full-sized avatar

Minhas Kamal MinhasKamal

View GitHub Profile
/**
* Name: Minhas Kamal
* Date: 24-Mar-2014
**/
#include <iostream>
#include <fstream>
#include <queue>
/**
* Developer: Minhas Kamal (BSSE-0509, IIT, DU)
* Date: 06.Sep.2015
* Comment: This code solves n-Queen problem using genetic algorithm.
**/
import java.util.Random;
public class GeneticAlgorithm {
int boardSize;
/**
* Developer: Minhas Kamal (BSSE-0509, IIT, DU)
* Date: 01.Sep.2015
* Comment: This piece of program solves 8 puzzle problem using A* search algorithm.
**/
import java.util.Random;
public class AStarSearch {
int SWAP_WITH_TOP=0, SWAP_WITH_RIGHT=1, SWAP_WITH_BOTTOM=2, SWAP_WITH_LEFT=3;
/**
* Developer: Minhas Kamal (BSSE-0509, IIT, DU)
* Date: 13.Nov.2013
**/
#include <iostream>
#include <fstream>
#include <queue>
using namespace std;
/**
* Developer: Minhas Kamal (BSSE-0509, IIT, DU)
* Date: 13.Nov.2013
**/
#include <iostream>
#include <fstream>
using namespace std;
/**
* Developer: Minhas Kamal (BSSE-0509, IIT, DU)
* Date: 15.Aug.2014
* Comment: I spent a whole day doing this little code! But it was really fun!
**/
#include <stdio.h>
#include <windows.h>
#include <time.h>
/**
* Developer: Minhas Kamal (BSSE-0509, IIT, DU)
* Date: Aug-2013
**/
#include <stdio.h>
#include <time.h>
int main()
{
@MinhasKamal
MinhasKamal / QuickSort.c
Last active December 4, 2015 18:57
This is a simple implementation of quick-sort algorithm in C language.
/**
* Developer: Minhas Kamal
* Date: August.2013
* Comment: Sorts the containing integers of a file using Quick Sort. The file format is as follows.
**/
///FileFormat
/*
100 //number of integers
19 34 29 67 37 90 99 89 45 56
@MinhasKamal
MinhasKamal / ZipFileMaker&Extractor.cpp
Last active April 14, 2017 10:46
It is a zip file maker which actually can zip text files.
/**
* Developer: Minhas Kamal
* Date: 28.Oct.2013
* Description: This program reads a file & Zips or Extracts it.
* Comment: I was in a puzzle at every step of developing this program, literally! And I am proud that I could solve them all, without any help, myself. The program should be able to zip or unzip any type of file, But can only make a text file smaller.
**/
#include <stdio.h>
#include <iostream>
@MinhasKamal
MinhasKamal / GiantFactorial.c
Last active February 13, 2017 07:39
It is a little program that theoritically can find out factorial of any number. You have to just change the value of the variable 'DIGIT'.
/**
* Developer: Minhas Kamal
* Date: August-2013
* Comment: The program can find very big factorial result, and it can be changed by changing 'DIGIT' value.
**/
#include <stdio.h>
#define DIGIT 10000000 //change accordingly