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
def multiplicative_inverse(a: int, b: int, t1: int = 0, t2: int = 1): | |
if b > a: | |
return multiplicative_inverse(b, a, t1, t2) | |
if b == 0: | |
return t1 | |
q = a // b | |
r = a % b | |
t = t1 - t2 * q | |
return multiplicative_inverse(b, r, t2, t) |
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 <stdbool.h> | |
typedef struct node { | |
int data; | |
struct node *next; | |
struct node *prev; | |
} 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 <stdbool.h> | |
typedef struct node { | |
int data; | |
struct node *next; | |
} NODE; | |
typedef struct lList { |
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 <stdbool.h> | |
typedef struct { | |
int *container; | |
int front, rear, size; | |
} Queue; | |
int len(Queue *); |
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 <string.h> | |
// Required Prototypes | |
char *get_file(char *); | |
int encrypt(char *); | |
char *renamef(char *, char *); | |
int main(int argc, char *argv[]) |
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
// Required headers | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
// prototypes | |
int **get_matrix(char *, int *, int *); | |
void free_matrix(int **, int); | |
int main(int argc, char *argv[]) |