Skip to content

Instantly share code, notes, and snippets.

View rajabishek's full-sized avatar

Raj Abishek rajabishek

View GitHub Profile
@rajabishek
rajabishek / infixToPostfixConversion.cpp
Last active August 29, 2015 14:06
Infix To Postfix Convertion
#include<iostream>
#include<stack>
using namespace std;
class PostfixConverter{
string infix;
string postfix;
bool isOperand(char C){
if(C >= '0' && C <= '9') return true;
@rajabishek
rajabishek / postfixEvaluation.cpp
Last active August 29, 2015 14:06
Postfix Evaluation
#include<iostream>
#include<stack>
using namespace std;
class PostfixEvaluator{
string expression;
bool isOperator(char c){
if(c == '+' || c == '-' || c == '*' || c == '/')
return true;
@rajabishek
rajabishek / sorting.cpp
Last active August 29, 2015 14:06
Sorting
#include<iostream>
using namespace std;
class Sort{
public:
static void swap(int& a, int &b){
int temp = a;
a = b;
b = temp;
@rajabishek
rajabishek / linkedList.cpp
Last active August 29, 2015 14:06
Linked List
#include<iostream>
using namespace std;
template <class datatype>
class Linkedlist{
Linkedlist* head;
public:
datatype data;
Linkedlist* next;
Linkedlist(){
@rajabishek
rajabishek / stack.cpp
Last active August 29, 2015 14:06
Stack
#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;
@rajabishek
rajabishek / queue.cpp
Last active October 28, 2021 17:53
Queue
#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(){
@rajabishek
rajabishek / circularQueue.cpp
Last active August 29, 2015 14:06
Circular Queue
#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:
@rajabishek
rajabishek / restoringDivision.cpp
Last active August 29, 2015 14:06
Restoring Division
#include<iostream>
#include<stack>
#include<math.h>
using namespace std;
class LinkedlistManager{
public:
int data;
LinkedlistManager* next;
LinkedlistManager* previous;
@rajabishek
rajabishek / BinarySearchTree.cpp
Last active March 19, 2016 11:03
Binary Search Tree
#include<iostream>
#include<queue>
using namespace std;
class Node {
public:
Node(int data){
this->data = data;
this->left = NULL;
this->right = NULL;
@rajabishek
rajabishek / hashtable.cpp
Last active December 11, 2016 07:13
Hash Table with Separate chaining
#include<iostream>
using namespace std;
struct item{
string name;
string drink;
item* next;
};
class HashManager{