MRManeesh Reddyinmaneeshreddy.hashnode.dev·Aug 30, 2023 · 1 min readChaining using hashing20) Write a cpp program to demonstrate the Hashing #include<iostream> #include<stdlib.h> using namespace std; #define max 100 typedef struct list { int data; struct list *next; }node; node *ptr[max],*root[max],*temp[max]; class dic { public: int i...00
MRManeesh Reddyinmaneeshreddy.hashnode.dev·Jun 12, 2023 · 4 min readCircular linkedList cpp#include <iostream> using namespace std; class CircularLinkedList { private: struct Node { int data; Node* next; }; Node* head; public: CircularLinkedList() { head = NULL; } void insertBegin(int va...00
MRManeesh Reddyinmaneeshreddy.hashnode.dev·Jun 12, 2023 · 3 min readsingle linkedlist cpp#include <iostream> using namespace std; class SinglyLinkedList { private: struct Node { int data; Node* next; }; Node* head; public: SinglyLinkedList() { head = NULL; } void insertBegin(int value)...00
MRManeesh Reddyinmaneeshreddy.hashnode.dev·Jun 12, 2023 · 4 min readDoubly LinkedList CPP#include <iostream> using namespace std; class DoublyLinkedList { private: struct Node { int data; Node* prev; Node* next; }; Node* head; Node* tail; public: DoublyLinkedList() { head = NULL; ...00
MRManeesh Reddyinmaneeshreddy.hashnode.dev·Mar 2, 2023 · 6 min readCP programs24. Implement call by reference mechanism by swapping two integers using pointers. CODE: #include<stdio.h> void swap(int *x,int *y){ int t; t=*x; *x=*y; *y=t; printf("\nValues After Swap: a = %d, b= %d",*x,*y); } void main() { int a,b; printf("\nEnte...00