P

@please_save_trees

11/09/2022

C++
3 years ago
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int n;

codechef 7/9/2022 mean

C++
3 years ago
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int x,y;

praful soln codechef 7/9/2022

C++
3 years ago
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int x,y;

praful linked in q 5/9/2022 2nd attempt

C++
3 years ago
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; string s; cin>>s;

praful linked in quest 5/9/2022

C++
3 years ago
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; string s; cin>>s;

this is how to insert values in 2d vector;

C++
3 years ago
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<vector<int>> v; for(int i=0;i<n;i++){

sunny,shop-atleast items

C++
3 years ago
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int sum=0; int p[n]={0};

codeforces 17.8.22.q2.div2

C++
3 years ago
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int n,k; cin>>n>>k;

16.8.22.lee.daichall

C++
3 years ago
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; string s; cin>>s; unordered_map<char,int>ump; for(int i=0;i<n;i++){

reverse a linked list using recursion

C++
3 years ago
#include <bits/stdc++.h> using namespace std; struct node{ int data; node* next; }; struct node* head;

printing the linked list using recursion

C++
3 years ago
#include<bits/stdc++.h> using namespace std; struct node{ int data; node* next; }; struct node *head;

c++ program to reverse linked list

C++
3 years ago
#include <bits/stdc++.h> using namespace std; struct node{ int data; node* next; }; struct node* head;

c++ program to insert node at head and tail of a liked list

C++
3 years ago
#include <bits/stdc++.h> using namespace std; struct node{ int data; node* next; }; struct node* head;

2 trains codechef

C++
3 years ago
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; int p[n]={0};

insert node at the head of a linked list

C++
3 years ago
#include<bits/stdc++.h> using namespace std; struct node{ int data; node* next; }; struct node *head;

python assignment 1

Python
3 years ago
import random def q1(s1): c=list(s1) return(c) s=input() a1=q1(s) print(a1)

python assignment 1

Python
3 years ago
import random def q1(s1): c=list(s1) return(c) s=input() a1=q1(s) print(a1)

codeforces 6.8.22.2

C++
3 years ago
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; cin>>n;

nearest greatest to right , nearest greatest element

C++
3 years ago
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n]; stack<int> st; vector<int> v; for(int i=0;i<n;i++){

candy problem

C++
3 years ago
#include<bits/stdc++.h> using namespace std; int main(){ int n,k; cin>>n>>k; int sum=0; int a[k+1]={0};