Skip to content

Instantly share code, notes, and snippets.

View this-mkhy's full-sized avatar
:octocat:
PlayFifa PlayCode

Mohamed Khaled Yousef this-mkhy

:octocat:
PlayFifa PlayCode
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mkhy19 on github.
  • I am mkhy (https://keybase.io/mkhy) on keybase.
  • I have a public key whose fingerprint is D187 19A0 E303 6068 B8C4 A368 7C9F 5AC8 B423 F0EE

To claim this, I am signing this object:

#include <bits/stdc++.h>
using namespace std;
struct node
{
int data;
struct node *left;
struct node *right;
};
#include <bits/stdc++.h>
using namespace std;
/*
if we have this tree
1
/ \
2 3
/ \

Keybase proof

I hereby claim:

  • I am mohamedkhaledyousef on github.
  • I am mkhy (https://keybase.io/mkhy) on keybase.
  • I have a public key whose fingerprint is D187 19A0 E303 6068 B8C4 A368 7C9F 5AC8 B423 F0EE

To claim this, I am signing this object:

@this-mkhy
this-mkhy / QueueArray.cpp
Created December 6, 2017 04:08
Create Queue using Array.
//Using Array
#include <iostream>
using namespace std;
// Constants
#define max 20
// Functions
@this-mkhy
this-mkhy / Queue2Stack.cpp
Created December 6, 2017 04:06
Create Queue using 2 stack.
//Using 2 stacks
#include<iostream>
#include<stack>
using namespace std;
class myQueue
{
private:
@this-mkhy
this-mkhy / Queue.cpp
Created December 6, 2017 04:04
Create Queue using Linked list
//QUEUE USING LINKED LIST
#include <bits/stdc++.h>
#include<conio.h>
using namespace std;
//Create a NODE
struct node
{
@this-mkhy
this-mkhy / Queue.cpp
Created December 6, 2017 04:01
Create Queue DS
#include <bits/stdc++.h>
using namespace std;
struct node
{
int data;
node *next;
}
*front = NULL,*tail = NULL,*Node = NULL,*newNode = NULL;
@this-mkhy
this-mkhy / BalancedBrackets.cpp
Created December 6, 2017 03:58
Use stack to solve Balanced Brackets problem (Medium level)
#include <bits/stdc++.h>
using namespace std;
bool isBalanced(string s)
{
vector<char> openingBracketsStack;
for(int i=0; i<s.size() ;++i)
{
@this-mkhy
this-mkhy / StackAndLinkedList.cpp
Created December 6, 2017 03:55
Stack using linked list
//Stack using linked list
#include<iostream>
using namespace std;
//Define node pointer
struct node
{
int data;
node* next;