This file contains 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<stack> | |
using namespace std; | |
class PostfixConverter{ | |
string infix; | |
string postfix; | |
bool isOperand(char C){ | |
if(C >= '0' && C <= '9') return true; |
This file contains 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<stack> | |
using namespace std; | |
class PostfixEvaluator{ | |
string expression; | |
bool isOperator(char c){ | |
if(c == '+' || c == '-' || c == '*' || c == '/') | |
return true; |
This file contains 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 Sort{ | |
public: | |
static void swap(int& a, int &b){ | |
int temp = a; | |
a = b; | |
b = temp; |
This file contains 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; | |
template <class datatype> | |
class Linkedlist{ | |
Linkedlist* head; | |
public: | |
datatype data; | |
Linkedlist* next; | |
Linkedlist(){ |
This file contains 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; | |
template <class datatype> | |
class StackInterface{ | |
public: | |
virtual void push(datatype data) = 0; | |
virtual datatype peek() = 0; | |
virtual void pop() = 0; | |
virtual bool isEmpty() = 0; |
This file contains 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; | |
template <class datatype> | |
class QueueInterface{ | |
public: | |
virtual void enqueue(datatype data) = 0; | |
virtual void dequeue() = 0; | |
virtual bool isEmpty() = 0; | |
virtual bool isFull(){ |
This file contains 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; | |
#define MAX_SIZE 11 | |
// Creating a class named Queue. | |
class Queue | |
{ | |
private: | |
int A[MAX_SIZE]; | |
int front, rear; | |
public: |
This file contains 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<stack> | |
#include<math.h> | |
using namespace std; | |
class LinkedlistManager{ | |
public: | |
int data; | |
LinkedlistManager* next; | |
LinkedlistManager* previous; |
This file contains 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<queue> | |
using namespace std; | |
class Node { | |
public: | |
Node(int data){ | |
this->data = data; | |
this->left = NULL; | |
this->right = NULL; |
This file contains 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; | |
struct item{ | |
string name; | |
string drink; | |
item* next; | |
}; | |
class HashManager{ |
OlderNewer