Needs to be done in C Design and implement an algorithm that determines whether…

SOLUTION AT Australian Expert Writers

Needs to be done in C Design and implement an algorithm that determines whether or not a given array of integers, list1, is completely contained within another given array of integers, list2. Consider two different scenarios: (1) Both arrays are unsorted and (2) both arrays are sorted and write functions unsortedSearch and sortedSearch for (1) and (2), respectively. Your algorithm for (2) is expected to be more efficient than the one for (1).See provided code belowArrayList.cpp code#include #include “ArrayList.h”using namespace std;/** Default constructor. Sets length to 0, initializing the list as an empty* list. Default size of array is 20.*/ArrayList::ArrayList(){ SIZE = 20; list = new int[SIZE]; length = 0;}/** Destructor. Deallocates the dynamic array list.*/ArrayList::~ArrayList(){ delete [] list; list = NULL;}/** Determines whether the list is empty.** Returns true if the list is empty, false otherwise.*/bool ArrayList::isEmpty(){ return length == 0;}/** Prints the list elements.*/void ArrayList::display(){ for (int i=0; i < length; i ) cout << list[i] << ” “; cout << endl;}/** Adds the element x to the end of the list. List length is increased by 1.** x: element to be added to the list*/void ArrayList::add(int x){ if (length == SIZE) { cout << “Insertion Error: list is full” << endl; } else { list[length] = x; length ; }}/** Removes the element at the given location from the list. List length is* decreased by 1.** pos: location of the item to be removed*/void ArrayList::removeAt(int pos){ if (pos = length) { cout << “Removal Error: invalid position” << endl; } else { for ( int i = pos; i < length – 1; i ) list[i] = list[i 1]; length–; }}/** Bubble-sorts this ArrayList*/void ArrayList::bubbleSort(){ for (int i = 0; i < length – 1; i ) for (int j = 0; j list[j 1]) { //swap list[j] and list[j 1] int temp = list[j]; list[j] = list[j 1]; list[j 1] = temp; }}/** Quick-sorts this ArrayList.*/void ArrayList::quicksort(){ quicksort(0, length – 1);}/** Recursive quicksort algorithm.** begin: initial index of sublist to be quick-sorted.* end: last index of sublist to be quick-sorted.*/void ArrayList::quicksort(int begin, int end){ int temp; int pivot = findPivotLocation(begin, end); // swap list[pivot] and list[end] temp = list[pivot]; list[pivot] = list[end]; list[end] = temp; pivot = end; int i = begin, j = end – 1; bool iterationCompleted = false; while (!iterationCompleted) { while (list[i] = 0)
Employee ID Validation Global Info Technologies has approached you to develop an application to maintain the work details of their
Employee ID Validation Global Info Technologies has approached you to develop an application to maintain the work details of their employees. Imagine you are developing the login module. In that module,you will have to validate the id with the format given from the client.The format is “GBL/001/0417”, here the first three letters are standard. Create a class UserMain and implement the functionalities which are required.Sample Input 1:Enter your IDGBL/020/0715Sample Output 1:Login successSample Input 2:Enter your IDABC/120/0215Sample Output 2:Incorrect ID
Classes are a useful way of storing related data items (in much the same way that a dictionary can store
Classes are a useful way of storing related data items (in much the same way that a dictionary can store key-value pairs). The code in this exercise implements a class for holding name and email address information. The function extract_names operates on a list of Contact objects to extract the names and return them in sorted order.Hint:Iterate through objects in the address_book and append the name member variable associated with each object to a running list of names. Don’t forget to sort the names before returning from the function.Code:class Contact: “””Encapsulates an email contact.””” def __init__(self, name, email): self.name = name self.email = email# DO NOT MODIFY CODE ABOVE THIS LINE def extract_names(address_book): “””Return a sorted list of all names in an address book, implemented as a list of Contact objects.””” # TODO: implement this function and replace the return statement return None# DO NOT MODIFY CODE BELOW THIS LINEaddr_book = []addr_book.append(Contact(“Mickey Mouse”, “[email protected]”))addr_book.append(Contact(“Minnie Mouse”, “[email protected]”))addr_book.append(Contact(“Goofy”, “[email protected]”))addr_book.append(Contact(“Pluto”, “[email protected]”))addr_book.append(Contact(“Winnie the Pooh”, “[email protected]”))print(“n”.join(extract_names(addr_book)))
Implement the following classes, each on a separate file:Point-x: int-y: int Point(x: int, y: int) Point() getX(): int getY(): int setX(x: int): void setY(y: int):
Implement the following classes, each on a separate file:Point-x: int-y: int Point(x: int, y: int) Point() getX(): int getY(): int setX(x: int): void setY(y: int): void toString(): String distance(point: Point): doubleLine-start: Point-end: Point Line(start: Point, end: Point) Line(x1: int, y1: int, x2: int, y2: int) getStart(): Point getEnd(): Point setStart(start: Point): void setEnd(end: Point): void length(): doubleMake a line object and invoke the length() method
In this exercise implement a class that represents a high score table for a computer game. Each entry in the
Programming Assignment Writing ServiceIn this exercise implement a class that represents a high score table for a computer game. Each entry in the table has a name and a score. The high score table only keeps the top three scores and initially is empty. Scores are always shown from highest score to lowest score.For example, if Mark scores 100 and Steve 110, the high score table should show:Steve 110 Mark 100 If Sylvie then scores 200, the high scores will be:Sylvie 200 Steve 110 Mark 100 If Alice then scores 150, the high scores will be:Sylvie 200 Alice 150 Steve 110 Notice that Mark is bumped off the bottom of the list.Implement the add method in the starter code below. Do not modify any of the other methods or test code at the end. As described in the note, the self.scores list should contain tuples of the form (name, score) for the rest of the methods to work correctly.CODE below:class HighScores: def __init__(self): “””Construct a new, empty high score table.””” self.scores = [] def add(self, name, score): “””Add a new entry if it is equal to or better than any of the current top three scores.””” # TODO: Implement this method. # Notes: # 1. The entries in `score` should be tuples of the form `(name, score)`. # 2. The entries should be in order from highest to lowest score. # 3. No more than three entries should be in `scores`. self.scores = sorted(self.scores, key = lambda x: (x[1], x[2])) def __str__(self): “””Formats this high score table as a string.””” # DO NOT MODIFY result = “HIGH SCORESn==========n” for name, score in self.scores: result = “{}tt{}n”.format(name, score) return result # DO NOT MODIFY BELOW THIS LINEhs = HighScores()hs.add(“Mark”, 100)hs.add(“Steve”, 110)print(hs)hs.add(“Bob”, 95)hs.add(“Mark”, 50)print(hs)hs.add(“Bob”, 150)print(hs)
What is the run-time complexity of the following algorithm, in terms of n and m?*def print_all_codes(n, m): def print_01_codes(current, num_digits):
What is the run-time complexity of the following algorithm, in terms of n and m?*def print_all_codes(n, m): def print_01_codes(current, num_digits): if num_digits == 0: print(current) else: print_01_codes(‘0’ current, num_digits – 1) print_01_codes(‘1’ current, num_digits – 1) upper_bound = 0 while True: for i in range(upper_bound): print_01_codes(”, n) if upper_bound > m: break upper_bound = 1
make an app that performs the required actions below. You may use the previous assignment files to help. – “process-insert-wish-form.php”
make an app that performs the required actions below. You may use the previous assignment files to help. – “process-insert-wish-form.php” should insert user data into a “wish” table- “select-wishes.php” should display all wishes from the “wishes” table. If a GET variable, “wishId”, is passed to this script via the url, this script should display all the wish data for that wishId only.On your own, create links and corresponding files to UPDATE wish data in the wish table and DELETE wishes. insert-wish-form The files are given below html,body{ padding: 0; margin: 0; background-color :GhostWhite;}.input{ width:250; height:30px; margin-bottom:7px;}.form{ height:350px; width:300px; margin-top: 50px; padding: 6px; border: 2px solid DimGrey;}.input[type=submit]{ width: 80px; height: 30px; font-variant: small-caps; font-weight:bold;}
Enter your Wish Here:
process-insert-wish-form <?php echo ” Your Name:“.$name;?><?php echo ” Your Friend’s name:“.$fname;?><?php echo ” Your Email:“.$mail;?><?php echo ” Your Friend Email:“.$fmail;?><?php echo ” Your Wish:“.$wish;?><img src=”” width=”100 px” height=”100px” alt=”” >delete-wish-formhtml,body{ padding: 0; margin: 0; background-color :GhostWhite;}.input{ width:250; height:30px; margin-bottom:7px;}.form{ height:350px; width:300px; margin-top: 50px; padding: 6px; border: 2px solid DimGrey;}input[type=submit]{ width: 80px; height: 30px; font-variant: small-caps; font-weight:bold;}
<input type =”hidden” name=”wishid” value=”” class=”input”>
process-delete-wish-form?php if($_SERVER[“REQUEST_METHOD”]==”POST”){ $wishid =$_POST[“wishid”];}?><?php echo ” Wish ID:“.$wishid;?>edit-wish-formhtml>html,body{ padding: 0; margin: 0; background-color :GhostWhite;}.input{ width:250; height:30px; margin-bottom:7px;}.form{ height:350px; width:300px; margin-top: 50px; padding: 6px; border: 2px solid DimGrey;}input[type=submit]{ width: 80px; height: 30px; font-variant: small-caps; font-weight:bold;}
Enter your Wish Here:
edit-wish-formhtml>html,body{ padding: 0; margin: 0; background-color :GhostWhite;}.input{ width:250; height:30px; margin-bottom:7px;}.form{ height:350px; width:300px; margin-top: 50px; padding: 6px; border: 2px solid DimGrey;}input[type=submit]{ width: 80px; height: 30px; font-variant: small-caps; font-weight:bold;}
Enter your Wish Here:
process-edit-wish-formprocess-edit-wish-form <?php echo ” Your Name:“.$name;?><?php echo ” Your Friend’s name:“.$fname;?><?php echo ” Your Email:“.$mail;?><?php echo ” Your Friend Email:“.$fmail;?><?php echo ” Your Wish:“.$wish;?><img src=”” width=”100 px” height=”100px” alt=””>select-wish-form html,body{padding:0;margin:0;}<?php echo”Wish:“.$wish;?><?php echo”Wish ID:“.$wishid;?>
An ATM only has 100, 50 and 20 dollar bills (USD) available to be dispensed. Given an amount between 40
An ATM only has 100, 50 and 20 dollar bills (USD) available to be dispensed. Given an amount between 40 and 10000 dollars (inclusive) and assuming that the ATM wants to use as few bills as possible, determinate the minimal number of 100, 50 and 20 dollar bills the ATM needs to dispense (in that order).Here is the specification for the withdraw method you’ll complete:Challenge.withdraw(amount)Parametersamount: Integer – Amount of money to withdraw. Assume that the amount is always divisible into 100, 50 and 20 bills.Return ValueInteger[] – An array of 3 integers representing the number of 100, 50 and 20 dollar bills needed to complete the withdraw (in that order).Constraints40 ≤ amount ≤ 1000ExamplesamountReturn Value250[2,1,0]260[2,0,3]370[3,1,1]import org.junit.Test;import static org.junit.Assert.assertArrayEquals;public class ChallengeTest { @Test public void basicTests() { assertArrayEquals(new int[] {0, 0, 2}, Challenge.withdraw(40)); assertArrayEquals(new int[] {2, 1, 0}, Challenge.withdraw(250)); assertArrayEquals(new int[] {2, 0, 3}, Challenge.withdraw(260)); assertArrayEquals(new int[] {1, 1, 4}, Challenge.withdraw(230)); assertArrayEquals(new int[] {0, 0, 3}, Challenge.withdraw(60)); }}
a) describedraw(b). In many fields of human endeavour, we use stacks on daily basis.Provide andtwoeach how Agape Savings and Loans
a) describedraw(b). In many fields of human endeavour, we use stacks on daily basis.Provide andtwoeach how Agape Savings and Loans Company can use singly-linked lists to keep track of customers that its Susu collectors (or mobile bankers) have won for the company over the last 2 months; and a suitable diagram (with hypothetical data) to illustrate the answer. explain practical examples where we use stacks in of the following fields: (i). Education (ii). Business (iii). Computer Science (iv). Manufacturing

Order from Australian Expert Writers
Best Australian Academic Writers

QUALITY: 100% ORIGINAL PAPERNO PLAGIARISM – CUSTOM PAPER