Automata Theory Questions and Answers
Automata Theory Questions and Answers
// gap sorted
found int j;
for (j = i; j >= gap && arr[j - gap] > temp; j -= gap)
arr[j] = temp;
return 0;
int main()
int n = sizeof(arr)/sizeof(arr[0]);
shellSort(arr, n);
return 0;
}
Output:-
Array before sorting:
30 11 12 40 20
11 12 20 30 40
Name :- Gaurav Ishwar Martand Roll no:-91
#include <stdio.h>
#include <stdlib.h>
}
}
int main()
{ int n;
Output:-
Enter the number of jobs: 3
#include <vector>
#include <string>
#include <iostream>
using namespace std;
int main() {
string tec = "1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";
string men;
vector<string> v;
return 0;
}
Output:-
Output: 6789=
Output: LKJHG
Name :- Gaurav Ishwar Martand Rollno:91
#include <stdio.h>
#include <stdbool.h>
int main() {
int kingX, kingY; // King's coordinates
int opponentX, opponentY; // Opponent's piece coordinates
return 0;
}
Output :-
Enter king's coordinates (x y): 8 8
Enter opponent's piece coordinates (x y): 1 1
King is under attack!
Enter king's coordinates (x y): 4 2
Enter opponent's piece coordinates (x y): 6 5
King is not under attack!