Skip to content

Instantly share code, notes, and snippets.

View rajivseelam's full-sized avatar

Rajiv Seelam rajivseelam

View GitHub Profile
@rajivseelam
rajivseelam / A.README
Last active June 7, 2017 06:15
Create Google Alert and grab the feed.
Google alerts is a way to manage your content by subscribing to keywords. Here is an example on how to make that google alert with php.
Get the feed url and parse the feed. There won't be any feed available as soon the alert is created.
-------------------------------------
Copy composer.json and do composer update.
Add this to providers
@rajivseelam
rajivseelam / circularlyLinkedList.c
Created December 10, 2012 07:06
Linked Lists (Single, Doubly, Circularly, Self Adjusting)
#include<stdio.h>
#include<stdlib.h>
typedef struct _node{
int data;
struct _node *next;
} node;
typedef node circularlyLinkedList;
@rajivseelam
rajivseelam / PermutationsOfString.c
Created October 16, 2012 08:41
Permutations of a String
#include<stdio.h>
void swap(char **s, int low, int high){
char temp;
temp = (*s)[low];
(*s)[low] = (*s)[high];
(*s)[high] = temp;
// printf("%s\n",*s);
#include<stdio.h>
int main(){
int numberOfProblems, problemThatCanBeSolved = 0, countOfPeople;
char line[1024];
char * str;
scanf("%d",&numberOfProblems);
@rajivseelam
rajivseelam / README.md
Created October 3, 2012 07:26 — forked from aronwoost/README.md
How to install LAMP on a EC2 Amazon AMI

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

@rajivseelam
rajivseelam / inplacerevstack.c
Created September 19, 2012 03:25
Reverse a stack (inplace)
/***
This program is similar to reversing a linked list. I have done anyway for the heck of it!
****/
#include<stdio.h>
#include<stdlib.h>
typedef struct _node {
int value;
struct _node * next;
@rajivseelam
rajivseelam / revlinkedlist.c
Created September 18, 2012 12:08
Reverse a Linked List
#include<stdio.h>
#include<stdlib.h>
typedef struct _node{
int value;
struct _node * next;
} node;
typedef node linkedlist;
@rajivseelam
rajivseelam / max_heap.c
Created September 17, 2012 12:11
Heaps implement Priority Queues
#include<stdio.h>
#include<stdlib.h>
#define MaxData (32767)
typedef struct _bheap{
int Capacity;
int Size;
int *Elements;
@rajivseelam
rajivseelam / avltree.c
Created September 10, 2012 09:51
AVL Tree
#include<stdio.h>
#include<stdlib.h>
/*********************** TREE ************************/
typedef struct _tnode{
int value;
struct _tnode *left;
struct _tnode *right;
} tnode;
@rajivseelam
rajivseelam / pre_succ_from_node.c
Created September 7, 2012 11:16
Find Predecessor & Successor of a node using two methods (One going up from node, other coming down from root)
#include<stdio.h>
#include<stdlib.h>
/*********
In this program we store the parent of the node too.
We go from node to find the corresponding parent.
***************/
/*********************** TREE ************************/
typedef struct _tnode{