DSA Assignment 1 Solved

25.00 $

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

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

 

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