Skip to content

Instantly share code, notes, and snippets.

@rv5047
rv5047 / min_maxHeap.cpp
Created November 4, 2023 05:17
This is a code in C++ to build min-max heap from given array along with different functionalities like getting min and max number, deleting min and max numbers and adding new number.
#include<iostream>
#include<cmath>
#include<climits>
using namespace std;
// Prototype of a utility function to swap two integers
void swap(int *x, int *y);
// A class for Min-Max Heap
class MinMaxHeap
@rv5047
rv5047 / brute_force_atk.cpp
Last active July 9, 2021 09:47
brute force attack on ceasar cipher implemented in c++
/* This is progam of ceasar cipher encryption and brute force attack */
#include<iostream>
using namespace std;
//function to encrypt the plain text
string encrypt(string x,int n)
{
string cipher="";
@rv5047
rv5047 / ceasar_cipher.cpp
Created January 10, 2019 14:40
ceasar cipher implementation in c++
#include<iostream>
using namespace std;
//function to encrypt the plain text
string encrypt(string x,int n)
{
string cipher="";
for(int i=0;i<x.length();i++)
{
@rv5047
rv5047 / doubly_linked_list.cpp
Last active March 28, 2018 14:45
doubly linked list implemented in c++
#include<iostream>
#include<stdlib.h>
using namespace std;
struct node
{
int info;
struct node *next;
struct node *prev;
}*head=NULL,*tail=NULL;
@rv5047
rv5047 / linked_list.cpp
Last active March 27, 2018 04:13
linked list program in c++
#include<iostream>
#include<stdlib.h>
using namespace std;
struct node
{
int info;
struct node *link;
}*head=NULL;