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
/*
*
*Created by: Mir Sahib
*Aug 18, 2017
*8:15:46 PM
*
*/
#include <iostream>
#include "list.h"
@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_
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;
//============================================================================
// Name : Doubly_LinkedList.cpp
// Author : Mir Sahib
// Version :
// Copyright : MIT License
// Description : Doubly Linked List implementation
//============================================================================
#include <iostream>
#include "List.h"
/*
*
*List.h
*
*Created on: Sep 8, 2017
* Author: Mir Sahib
*
*/
#ifndef LIST_H_
@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)
@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 / Bug_LinkedList.cpp
Last active October 12, 2017 08:33
Bug in addAt
void addAt(int index,int val){
temp = new node;
temp->data = val;
int y = temp->data;
temp->next = NULL;
y = temp->data;
if(head==NULL){
cout<<"The list is empty"<<endl;
y=temp->data;
}else if(index==0){
@mirsahib
mirsahib / singlyList.cpp
Last active October 14, 2017 14:13
draft of singly linked list
//============================================================================
// Name : LinkedList.cpp
// Author : Mir Sahib
// Version : 0.1(beta)
// Copyright : MIT License
// Description : Singly Linked List implementation
//============================================================================
#include <iostream>
@mirsahib
mirsahib / install-firefox-linux.md
Created October 16, 2017 06:49 — forked from stephenharris/install-firefox-linux.md
Installing a particular version of firefox on Linux.

Installing a particular version of FireFox on Linux

  1. Does an existing version of firefox exist?

    firefox --version
    

    If not, skip to (3).