-
Does an existing version of firefox exist?
firefox --version
If not, skip to (3).
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
Node* deleteNode(int value,Node* node){ | |
if(node==NULL){ | |
return node; | |
}else if(value< node->data){ | |
//value is less than node data | |
node->left = deleteNode(value,node->left); | |
}else if(value>node->data){ | |
//value is more than node data | |
node->right = deleteNode(value,node->right); | |
}else{ |
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 <iostream> | |
using namespace std; | |
class Node{ | |
public: | |
int data; | |
Node* next; | |
}; |
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 <iostream> | |
using namespace std; | |
class Queue{ | |
private: | |
int Front; | |
int Rear; | |
int length; | |
int num_array[100]; |
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 <iostream> | |
using namespace std; | |
class Stack{ | |
private: | |
int top; | |
int num_array [100]; | |
public: | |
Stack(){ |
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: Mir Sahib | |
ID: 1510175 | |
Assignment_4 | |
*/ | |
#include <iostream> | |
using namespace std; | |
struct node{ | |
int data; |
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 <iostream> | |
#include <cstdlib> | |
using namespace std; | |
int main() | |
{ | |
int row=10, num; | |
cin>>num;//if you take row as a input the program will have a bug | |
int *arrayList = new int[row]; |
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
void insertBeforeParticularItem(int searchVal,int val){ | |
int counter = 0; | |
if(head == NULL){ | |
cout<<"List is empty"<<endl; | |
}else{ | |
curr = head; | |
node* prev = NULL; | |
while(curr!=NULL){ | |
if(curr->data==searchVal){ | |
node *newNode = new node; |
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
//============================================================================ | |
// Name : LinkedList.cpp | |
// Author : Mir Sahib | |
// Version : 0.1(beta) | |
// Copyright : MIT License | |
// Description : Singly Linked List implementation | |
//============================================================================ | |
#include <iostream> |
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
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){ |