Skip to content

Instantly share code, notes, and snippets.

View harish-r's full-sized avatar

Harish R harish-r

  • A10 Networks, Inc.
  • San Jose, CA
View GitHub Profile
@harish-r
harish-r / Binary Search Tree.c
Last active April 4, 2024 03:35
Binary Search Tree Implementation in C
/* Binary Search Tree Implementation in C */
/* Harish R */
#include<stdio.h>
#include<stdlib.h>
struct TreeNode
{
int data;
struct TreeNode* left;
@harish-r
harish-r / Binary Search Tree.cpp
Last active January 7, 2024 16:30
Binary Search Tree Implementation in C++
/*
** Binary Search Tree implementation in C++
** Harish R
*/
#include<iostream>
using namespace std;
class BST {
struct node {
@harish-r
harish-r / AVL Tree.cpp
Created October 18, 2014 11:11
AVL Tree Implementation in C++. Self Balancing Tree
/* AVL Tree Implementation in C++ */
/* Harish R */
#include<iostream>
using namespace std;
class BST
{
@harish-r
harish-r / Linked List.cpp
Created September 6, 2014 07:18
Linked List Implementation in C++
// Linked List CPP
#include<iostream>
using namespace std;
class Node
{
public:
int data;
Node *next;
@harish-r
harish-r / Queue - Linked List Implementation.cpp
Created September 7, 2014 08:12
Queue - Linked List Implementation in C++
// Queue - Linked List Implementation
#include<iostream>
using namespace std;
class Node
{
public:
int data;
Node *next;
@harish-r
harish-r / macos_cpp14.sh
Created March 30, 2020 00:40
Script to install C & C++ 14 GNU compiler in Mac OS Mojave
#!/bin/bash
sudo su
cd ~
mkdir gcc_all && cd gcc_all
#
curl -L https://ftpmirror.gnu.org/gcc/gcc-9.1.0/gcc-9.1.0.tar.xz | tar xf -
#
curl -L ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 | tar xf -
curl -L ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2 | tar xf -
curl -L ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz | tar xf -
@harish-r
harish-r / Quick Sort.cpp
Created April 7, 2014 18:02
Quick Sort Algorithm in C++
/*
* Quick Sort Algorithm
* Language: C++
* Created by: Harish R
*/
#include<iostream>
using namespace std;
@harish-r
harish-r / Queue - Array Implementation.cpp
Created September 7, 2014 08:06
Queue Array Implementation in C++
#include<iostream>
#define MAX 5
using namespace std;
class Queue
{
public:
int front, rear;
int queue_array[MAX];
@harish-r
harish-r / Merge Sort.c
Last active September 21, 2019 03:29
Merge Sort Algorithm in C++
/*
* Merge Sort Algorithm
* Language: C++
* Created by: Harish R
*/
#include <stdio.h>
#include <stdlib.h>
void merge(int *a, int *l, int nL, int *r, int nR)
@harish-r
harish-r / .vimrc
Last active September 5, 2019 01:36
" ################## Vim Plug Begin ##################
call plug#begin('~/.vim/plugged')
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'scrooloose/nerdtree'
call plug#end()
" ################## Vim Plug End ####################