Skip to content

Instantly share code, notes, and snippets.

View mirsahib's full-sized avatar
🎯
Focusing

Mir Habib Ul Latif 🇧🇩 🇵🇸 mirsahib

🎯
Focusing
View GitHub Profile
@mirsahib
mirsahib / LinkedList.cpp
Created October 12, 2017 05:07
singly linked list
#include <iostream>
using namespace std;
class node{
int data;
node* next;
}
class List{
@mirsahib
mirsahib / Assignment_1.cpp
Last active September 30, 2017 17:48
IUB CSE 203 Data Structure Assignment
/*
Author: Mir Sahib
ID:1510175
Updated: 30 Sep 17
*/
#include <iostream>
using namespace std;
//pattern 1 a)
/*
*
*List.h
*
*Created on: Sep 8, 2017
* Author: Mir Sahib
*
*/
#ifndef LIST_H_
//============================================================================
// Name : Doubly_LinkedList.cpp
// Author : Mir Sahib
// Version :
// Copyright : MIT License
// Description : Doubly Linked List implementation
//============================================================================
#include <iostream>
#include "List.h"
void List::insertToNthPosition(int pos,int newData){
temp = new node;
temp->data = newData;
temp->next = NULL;
if(pos==1){
head = temp;
}else{
curr = head;
for(int i=0;i<pos-2;i++){
curr=curr->next;
@mirsahib
mirsahib / List.h
Last active September 6, 2017 10:19
/*
*
*List.h
*
*Created on: Aug 19, 2017
* Author: Mir Sahib
*
*/
#ifndef LIST_H_
#define LIST_H_
/*
*
*Created by: Mir Sahib
*Aug 18, 2017
*8:15:46 PM
*
*/
#include <iostream>
#include "list.h"
@mirsahib
mirsahib / README-Template.md
Created August 29, 2017 20:15 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mirsahib
mirsahib / karatsuba_pseudocode.txt
Created May 16, 2017 08:58 — forked from anirudhjayaraman/karatsuba_pseudocode.txt
Pseudocode for Karatsuba Multiplication Algorithm
procedure karatsuba(num1, num2)
if (num1 < 10) or (num2 < 10)
return num1*num2
/* calculates the size of the numbers */
m = max(size_base10(num1), size_base10(num2))
m2 = m/2
/* split the digit sequences about the middle */
high1, low1 = split_at(num1, m2)
high2, low2 = split_at(num2, m2)
/* 3 calls made to numbers approximately half the size */
import java.awt.Color;
import java.awt.Toolkit;
import java.awt.event.WindowEvent;
import java.util.ArrayList;
import javax.swing.JLabel;
import javax.swing.table.DefaultTableModel;
/*
* To change this license header, choose License Headers in Project Properties.