diff --git a/assignment-29 (Early access).cpp b/assignment-29 (Early access).cpp deleted file mode 100644 index 482a1e6..0000000 --- a/assignment-29 (Early access).cpp +++ /dev/null @@ -1,190 +0,0 @@ -#include -using namespace std; - -class queue -{ - int data[20]; - int f, r; - -public: - queue() - { - f = -1; - r = -1; - } - - int isempty() - { - if (f == -1) - { - return 1; - } - else - { - return 0; - } - } - - int isfull() - { - if (r >= 20) - { - return 1; - } - else - { - return 0; - } - } - - void enqueue(int x) - { - if (isfull() == 1) - { - cout << "job queue is full" << endl; - } - else - { - if (f == -1) - f++; - r++; - data[r] = x; - } - } - - void dequeue() - { - int x; - if (isempty()) - { - cout << "job queue is empty" << endl; - } - else - { - x = data[f]; - f++; - cout << x << "Job deleted " << endl; - } - } - - void disp() - { - cout << "job queue is as :" << endl; - for (int i = f; i <= r; i++) - { - cout << data[i] << " "; - } - cout << endl; - } -}; - -int main() -{ - int ch, n, x, d; - queue q; - cout << "Enter the no. of jobs in queue. " << endl; - cin >> n; - cout << "Enter jobs " << endl; - for (int i = 0; i < n; i++) - { - cin >> d; - q.enqueue(d); - } - do - { - cout << "**********MENU**********" << endl; - cout << "1)Add job " << endl; - cout << "2)Delete job " << endl; - cout << "3)Display" << endl; - cout << endl; - cout << "Enter your choice " << endl; - cin >> ch; - - switch (ch) - { - case 1: - cout << "Enter the job to be added " << endl; - cin >> d; - q.enqueue(d); - cout << "Job added" << endl; - q.disp(); - break; - - case 2: - q.dequeue(); - q.disp(); - break; - - case 3: - q.disp(); - break; - - default: - cout << "Invalid choice" << endl; - break; - } - cout << "Do you want to continue" << endl; - cout << "1. YES" << endl; - cout << "2. NO" << endl; - cin >> x; - - } while (x == 1); -} - -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~ Output ~~~~~~~~~~~~~~~~~~~~~~~~~ - -Enter the no. of jobs in queue. -10 -Enter jobs -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -**********MENU********** -1)Add job -2)Delete job -3)Display - -Enter your choice -3 -job queue is as : -1 2 3 4 5 6 7 8 9 10 -Do you want to continue -1. YES -2. NO -1 -**********MENU********** -1)Add job -2)Delete job -3)Display - -Enter your choice -11 -Invalid choice -Do you want to continue -1. YES -2. NO -1 -**********MENU********** -1)Add job -2)Delete job -3)Display - -Enter your choice -2 -1Job deleted -job queue is as : -2 3 4 5 6 7 8 9 10 -Do you want to continue -1. YES -2. NO -2 - - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ diff --git a/quicksortEarlyAccess.py b/quicksortEarlyAccess.py deleted file mode 100644 index a7b82b8..0000000 --- a/quicksortEarlyAccess.py +++ /dev/null @@ -1,38 +0,0 @@ -no = int(input("Enter number of students: ")) -list2 = [] -#list1 = [] -for i in range(0,no): - n = float(input("Enter % of student: ")) - list2.append(n) -print(list2) - -d = len(list2) - -def partition(list3,a,b): - v = list3[a] - i = a - j = b-1 - temp = 0 - while(i v): - j = j - 1 - if(i