Skip to content

Instantly share code, notes, and snippets.

View jaelim's full-sized avatar

Jae Lim jaelim

  • Los Angeles, California
View GitHub Profile
@mycodeschool
mycodeschool / BalancedParentheses.cpp
Created October 29, 2013 00:49
C++ Program to check for balanced parentheses in an expression using stack.
/*
C++ Program to check for balanced parentheses in an expression using stack.
Given an expression as string comprising of opening and closing characters
of parentheses - (), curly braces - {} and square brackets - [], we need to
check whether symbols are balanced or not.
*/
#include<iostream>
#include<stack>
#include<string>
using namespace std;
@mycodeschool
mycodeschool / Stack_ArrayImplementation_OOP.cpp
Created October 8, 2013 02:44
An object oriented implementation of stack using arrays in C++.
// Stack - Object oriented implementation using arrays
#include <iostream>
using namespace std;
#define MAX_SIZE 101
class Stack
{
private:
int A[MAX_SIZE]; // array to store the stack
int top; // variable to mark the top index of stack.
@mycodeschool
mycodeschool / Stack_ArrayImplementation.C
Last active April 15, 2025 06:28
This is a basic array based implementation of stack data structure in C.
// Stack - Array based implementation.
// Creating a stack of integers.
#include<stdio.h>
#define MAX_SIZE 101
int A[MAX_SIZE]; // integer array to store the stack
int top = -1; // variable to mark top of stack in array
// Push operation to insert an element on top of stack.
@mycodeschool
mycodeschool / gcd.cpp
Last active March 25, 2024 01:30
GCD: Brute force and Euclid's algorithm
#include<algorithm>
using namespace std;
int euclid_gcd(int a, int b)
{
while (b != 0)
{
int r = a % b;
a = b;
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 19, 2025 05:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname