Skip to content

Instantly share code, notes, and snippets.

View apshada's full-sized avatar
🎯
Focusing

Aditya Pratap Singh Hada apshada

🎯
Focusing
View GitHub Profile
version: '3.8'
services:
db:
container_name: pg_container
image: postgres
restart: always
environment:
POSTGRES_USER: POSTGRES_USERNAME
POSTGRES_PASSWORD: POSTGRES_PASSWORD
POSTGRES_DB: psql
#include <bits/stdc++.h>
using namespace std;
struct QNode {
int data;
QNode* next;
QNode(int d)
{
data = d;
next = NULL;
#include<bits/stdc++.h>
using namespace std;
//create a structure for Node which will
// contain data and pointer to next Node
struct Node{
int data;
struct Node* next;
//Function to create new node
//with Next Pointing to NULL
Node(int x){
#include <bits/stdc++.h>
using namespace std;
/* This function takes last element as pivot, places
the pivot element at its correct position in sorted
array, and places all smaller (smaller than pivot)
to left of pivot and all greater elements to right
of pivot */
int partition (vector<int> &arr, int low, int high)
{
int pivot = arr[high]; // pivot
#include<bits/stdc++.h>
using namespace std;
//create a structure for Node which will
// contain data and pointer to next Node
struct Node{
int data;
struct Node *next;
//Function to create new node
//with Next Pointing to NULL
Node(int x){