[SOLVED] DSA Assignment 1

25.00 $

Category: Tags: , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Assignment-1-xiva8f.zip (293.3 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (2 votes)

 

Assignment 1

Implement the following String functions w/o using any of the library functions in C

string length, string copy, string reverse, string concatenate
Three integer arrays are sorted. Find the common elements in the 3 arrays
For a given string and pattern, check if the pattern exists in the given string using:

o Brute Force
o KMP
o Rabin Karp Algorithm

For a given set of flights, the arrival and departure times are provided in 2 arrays. Lets say there are 3 flights with arrival and departure times provided as per the arrays provided below:

int arr[] = { 100, 300, 500 }; int dep[] = { 900, 400, 600 };

Find the minimum number of runways required to land/depart for each flight.

Use Counting Sort to sort the elements/characters in the following array:

char arr[]={β€˜M’, β€˜T’, β€˜Y’, β€˜S’, β€˜A’, β€˜P’};

Assume that you are creating a Text editor. Like any other text editor, your editor must have a feature to find a particular set of characters/String. Write code to implement the same using Automata. Explain KMP and Rabin-Karp Algorithm

5.

6.

Using Binary Search find the count/frequency (how many times it occurs) of a particular element in an array.
An array contains only 0s and 1s. Write a code to count the Sub arrays

7.
having equal no. of 0s and 1s

8.

  • Assignment-1-xiva8f.zip