Category: A ll Codes

01
Aug
2017

Swap without a temp variable

It’s possible with addition: #include<iostream> using namespace std; int main(){ int x=10,y=15; cout<<“Before swapping: x=”<<x<<“y=”<<y<<endl; x=x+y; //25…

23
Jun
2017

QuickSort

Youtube Video: Analaysis though it seems little bit tough to me: HackerRank video: MIT video: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/lecture-4-quicksort-randomized-algorithms/ Pseudo Code…

12
Jun
2017

Print Hackerearth

I am implementing the solution after seeing the code: #include<iostream> #include<bits/stdc++.h> using namespace std; int main() {…

11
Jun
2017

10579 Fibonacci Numbers

code: import java.math.BigInteger; import java.util.Scanner; /** * Created by Zaki on 6/11/2017. */ public class Uva_Fibonacci {…

11
Jun
2017

BigInteger in Java and C++

code: for c++ this link link or google search is good but i didn’t found any goood…

09
Jun
2017

Stevie Hackerearth

code: #include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define ff…