This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<math.h> | |
struct node{ | |
int value; | |
struct node *left; | |
struct node *right; | |
}; | |
typedef struct node Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct queue{ | |
struct node *element; | |
struct queue *next; | |
}; | |
typedef struct queue Queue; | |
void printLevel(Node * node){ | |
Queue *q = NULL; | |
enqueue(&q, node); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<math.h> | |
struct node{ | |
int value; | |
struct node *left; | |
struct node *right; | |
}; | |
typedef struct node Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MAX_NUMBER_LENGTH 3 | |
const char hashTable[10][4] = {"", "", | |
"abc", "def", | |
"ghi", "jkl", | |
"mno", "pqrs", | |
"tuv", "wxyx"}; | |
void printWords(int number[], int curr_digit, char output[]){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<math.h> | |
struct node{ | |
int value; | |
struct node *left; | |
struct node *right; | |
}; | |
typedef struct node Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<math.h> | |
struct node{ | |
int value; | |
struct node *left; | |
struct node *right; | |
}; | |
typedef struct node Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<math.h> | |
void swap(int *a, int *b){ | |
int temp = *a; | |
*a = *b; | |
*b = temp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdlib.h> | |
#include<stdio.h> | |
typedef struct node{ | |
int data; | |
struct node *next; | |
} Node; | |
/* This function is actually helper function which does all house keeping like | |
calculating lengths of lists,calling recursive implementation, creating extra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdlib.h> | |
#include<stdio.h> | |
#define max(a,b) (a>b) ? a:b | |
int longest_arithmetic_progression(int a[], int n){ | |
int i,j,k; | |
int Table[n][n]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int PossiblePaths(int i,int j, int m, int n){ | |
if(i > m || j > n) return 0; | |
if(i == m && j == n) return 1; | |
return PossiblePaths(i+1,j, m,n) | |
+ PossiblePaths(i, j+1, m,n) | |
+ PossiblePaths(i+1, j+1,m,n); | |
} |
OlderNewer