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
public class LCS { | |
public static void main(String[] args) { | |
String mohamed = "MOHAMED"; | |
String ahmed = "AHMED"; | |
int dpMatrix[][] = new int[mohamed.length() + 1][ahmed.length() + 1]; | |
for (int i = 0; i <= mohamed.length(); i++) | |
for (int j = 0; j <= ahmed.length(); j++) | |
if (i == 0 || j == 0) | |
dpMatrix[i][j] = 0; |
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
#!/bin/sh | |
read -p "enter n " n | |
declare -a ARR | |
for (( c=0; c<$n; c++ )) | |
do | |
read -p "enter " ARR[$c] | |
done | |
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 <pthread.h> | |
#include <semaphore.h> | |
#include <math.h> | |
#include <ctype.h> | |
#define NUM 15 | |
int number = NUM, buff = 0; | |
char queue[NUM][NUM]; | |
sem_t full_sem, empty_sem; |
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 <pthread.h> | |
#include <semaphore.h> | |
#include <math.h> | |
#include <ctype.h> | |
#define NUM 15 | |
int number = NUM, buff = 0; | |
char queue[NUM][NUM]; | |
sem_t full_sem, empty_sem; |
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 <pthread.h> | |
#include <semaphore.h> | |
#include <math.h> | |
#include <ctype.h> | |
#define NUM 15 | |
int number = NUM, buff = 0,buff2 = 0; | |
char queue[NUM][NUM],queue2[NUM][NUM]; |
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 <pthread.h> | |
#include <semaphore.h> | |
#include <math.h> | |
#include <ctype.h> | |
#define NUM 15 | |
int number = NUM, buff = 0; | |
char queue[NUM][NUM]; | |
sem_t full_sem, empty_sem; |
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 <pthread.h> | |
#include <semaphore.h> | |
#include <math.h> | |
#include <ctype.h> | |
#define NUM 15 | |
int number = NUM, buff = 0; | |
char queue[NUM][NUM]; | |
sem_t full_sem, empty_sem; |
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 <pthread.h> | |
#include <semaphore.h> | |
#include <math.h> | |
#include <ctype.h> | |
#define NUM 15 | |
int number = NUM, buff = 0; | |
char queue[NUM][NUM]; | |
sem_t full_sem, empty_sem; |
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 <pthread.h> | |
#include <semaphore.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <ctype.h> | |
#include <time.h> | |
#include <unistd.h> | |
char queueOfChars[10]; |
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 <pthread.h> | |
#include <semaphore.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <ctype.h> | |
#include <time.h> | |
#include <unistd.h> | |
char q[10]; |