Skip to content

Instantly share code, notes, and snippets.

View pradeepvarma22's full-sized avatar
🎯
Focusing

Pradeepvarma_22 pradeepvarma22

🎯
Focusing
View GitHub Profile
set nocompatible
set backspace=indent,eol,start
" shift+arrow selection
nmap <S-Up> v<Up>
nmap <S-Down> v<Down>
nmap <S-Left> v<Left>
nmap <S-Right> v<Right>
vmap <S-Up> <Up>
vmap <S-Down> <Down>
#include<stdio.h>
#include<ctype.h>
char stack[100];
int top = -1;
void push(char x)
{
stack[++top] = x;
}
@pradeepvarma22
pradeepvarma22 / gist:ed4ec4ef36028a533bc9c884d0643a65
Created October 14, 2020 13:48 — forked from psayre23/gist:c30a821239f4818b0709
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
@pradeepvarma22
pradeepvarma22 / gist:39b94dd0474df1a8f12827adc7e2a548
Created June 28, 2020 08:39 — forked from DD3Boh/gist:6c51fd3c5f91b1042e956771483714de
How to merge a newer CAF tag in an android kernel
First go here:
https://wiki.codeaurora.org/xwiki/bin/QAEP/release
This site gives information about all msm soc release details with tag + android version
Search your msm here.. Check the latest one and look for correct android version and mark that tag.
Now open one of the following links (dependent on your linux kernel version)
anudeep2011
2012-03-07 20:06:49 TEST
2012-03-07 21:15:26 PRIME1
2012-03-07 21:55:30 ONP
2012-03-07 23:11:36 PALIN
2012-03-08 13:26:47 ARITH
2012-03-09 19:49:46 FCTRL
2012-03-09 19:54:12 FCTRL2
2012-03-13 18:19:13 CMPLS
2012-03-13 21:14:39 ADDREV
/* Queue - Circular Array implementation in C++*/
#include<iostream>
using namespace std;
#define MAX_SIZE 101 //maximum size of the array that will store Queue.
// Creating a class named Queue.
class Queue
{
private:
int A[MAX_SIZE];
@pradeepvarma22
pradeepvarma22 / WhiteSpace_count.cpp
Created February 3, 2020 12:35
Input white space in cpp
#include<bits/stdc++.h>
#include<vector>
#define pb push_back
#define IO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long int
using namespace std;
int main() {
int tc;
cin>>tc;
while(tc--)
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,i,count=0;
cin>>n;
int a[n];
for(i=0;i<n;i++)
{
@pradeepvarma22
pradeepvarma22 / Excel_Column_Name.cpp
Last active July 20, 2019 19:00
Deprecated Code Update Soon
/*https://www.hackerrank.com/contests/smart-interviews-bvritn-2021a/challenges/si-find-excel-column-name/problem
Error : Timelimit Exceed
*/
#include<bits/stdc++.h>
using namespace std;
int as=64;
void varma(int n)
{
cout<<char(n+as);
@pradeepvarma22
pradeepvarma22 / Smart_String.cpp
Created July 20, 2019 18:09
Smart Inteview test
/*https://www.hackerrank.com/contests/smart-interviews-bvritn-2021a/challenges/si-smart-string*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
int i,j;
string a;
cin>>a;
sort(a.begin(),a.end());