Preview

ECET 370 Week 5 Lab 5

Good Essays
Open Document
Open Document
650 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
ECET 370 Week 5 Lab 5
This work of ECET 370 Week 5 Lab 5 shows the solutions to the following problems:

Exercise 1

Exercise 2

Exercise 3/2

Exercise 4

General Instructions

Exercise 1 uses the programs in DocSharing labeled "Search algorithms."

Exercise 1: Review of the Lecture Content Create a project using the ArrayList class and the Main class provided in DocSharing. The ArrayList class contains implementations of the first three search methods explained in this week's lecture: sequential, sorted, and binary search. The Main class uses these three methods. These programs test the code discussed in the lecture. Compile the project, run it, and review the code that is given carefully.

Exercise 2: Search Algorithms and Techniques Expand the project developed in the previous exercise to perform the following experiment: time the three search methods several times each and record the results. Compare the running times of the three search methods (sequential search, sorted search, and binary search) which are obtained during the experiment. What conclusions can be drawn?

Exercise 3: Searching Applications Select one of the following two problems to solve: Problem 1: Design and implement an algorithm that determines whether or not a given array of elements, listl, is completely contained within another given array of elements, Iist2. Consider two different scenarios: 1) both arrays are sorted; 2) both arrays are unsorted. Problem 2: Design an algorithm that when given a collection of integers in an unsorted array, determines the second smallest number (or second minimum). For example, if the array consists of the values 12, 23, 9, 17, 3, the algorithm should report the value 9, since it is the second smallest number in the array. Write a function that...

For downloading more tutorials visit - https://bitly.com/12AVY6O

You should seriously think about taking your required courses at a local community college. This will save you some money.

You May Also Find These Documents Helpful

  • Good Essays

    Nt1420 Unit 6

    • 1145 Words
    • 5 Pages

    INSTRUCTIONS: 1. THERE ARE SIX (6) QUESTIONS IN THIS PAPER. 2. ANSWER FIVE (5) QUESTIONS ONLY. Question 1 Arrays are used when storing a large number of values. You are required to create an array named a and answer the following questions regarding array manipulation. a. Write a method fillRandom(int[] a, int min, int max), fill the array a with a random integer value. (Note: Math.random() returns a double in the range of 0.0 and 1.0, therefore it is cast to an integer number, between the minimum and maximum value). [6 marks] b. Write the Bubble sort method to sort array a into descending order. [10 marks] c. In the quicksort, an algorithm an element is chosen from the unsorted list. This element is called the…

    • 1145 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Exercise 1: Review of array-based lists Create a project using the classes in the DocSharing area labeled “User-defined array list." Compile it, run it, and review the code that is given carefully. This code tests the ArrayList class provided in the lecture.…

    • 714 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Netw 410 Week 1 Lab

    • 883 Words
    • 3 Pages

    My version saved files using the .vsd extension. It can also use .bmp, .jpg, .xps and many others.…

    • 883 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    IS3120 Week 5 Lab

    • 914 Words
    • 3 Pages

    Prior to implementation we’ll need to see what kind of network the campus would need. The requirements of the campus call for an infrastructure network, as ad-hoc is merely computer to computer, but the requirements call for wireless access to the campuses internal network and provide access to the internet. Next to that we’ll need to identify what speed/capabilities the network will need to provide. Seeing how the campus has thousands of students as well as the admin and faculty, there is probably a need for strong wireless capabilities and so I recommend a 802.11g. You also need to identify security issues and ensure they’re implemented before putting the network online; this is to ensure there is no weakness in the network from the start.…

    • 914 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    CJA 374 Week 5 DQs

    • 423 Words
    • 3 Pages

    This work of CJA 374 Week 5 Discussion Questions shows the solutions to the following problems:…

    • 423 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Look into attending community college for your first year or two. You can do a lot of basic classwork this way without spending a lot money. You can always transfer to the university of your preference after you have completed your transfer units. This is a great option if you cannot afford a four year degree.…

    • 486 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Complexities! Good Fair Poor Searching Algorithm Data Structure Time Complexity Depth First Search (DFS) Graph of |V| vertices and |E| edges Graph of |V| vertices and |E| edges Sorted array of n elements Array - O(|E| + |V|) O(|V|) - O(|E| + |V|) O(|V|) O(log(n)) O(log(n))…

    • 990 Words
    • 18 Pages
    Good Essays
  • Powerful Essays

    netwk 320 week 7 i lab

    • 1102 Words
    • 5 Pages

    Close the FTP tree. Expand E-mail and select Download Response Time (sec). Change the view from AS IS to time_average and select the Show button. Zoom in on the last two-thirds of the graph to eliminate start-up oscillation time and to get better granularity of the results. Copy and label this graph to your lab report. Then use this graph to answer the following questions.…

    • 1102 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    Boolean Search Operators

    • 1581 Words
    • 7 Pages

    On Internet search engines, the options for constructing logical relationships among search terms often modify the traditional practice of Boolean searching. This will be covered in the section below, Boolean Searching on the Internet.…

    • 1581 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    CS 220 – Programming w/ Data Structures: You have missed one assignment and one quiz. Your instructor has extended your assignment due date to this Sunday, April 10. Your instructor has also let you to take your Quiz # 2 during his office hours during this week. Let me know if you need additional support to study for this quiz. Your grade to date in this class is 30.2/37 81.62% B.…

    • 354 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Insertion Sort

    • 690 Words
    • 3 Pages

    The main operation of the algorithm is insertion. The task is to insert a value into the sorted part of the array. Let us see the variants of how we can do it.…

    • 690 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Binary Search Trees (BSTs) Def. A BINARY SEARCH TREE is a binary tree in symmetric order. it A binary tree is either: empty a key-value pair and two binary trees [neither of which contain that key]…

    • 2419 Words
    • 10 Pages
    Good Essays
  • Satisfactory Essays

    * a type of value that deals with finding a given value called the key in a given list or set.…

    • 374 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    There are ten questions in this assignment, which carries 80 marks. Rest 20 marks are for viva-voce. Answer all the questions. You may use illustration and diagrams to enhance the explanations. Please go through the guidelines regarding assignments given in the MCA Programme Guide for the format of presentation. The examples, whenever asked to be given, should be different from those that are discussed in the course material. Question1: Using Insertion Sort, sort the following sequence in increasing (10 marks) order and do the analysis of the algorithm: 35, 37, 18, 15, 40, 12 Question 2: Write a pseudocode for divide and conquer algorithm for finding the position of an array of n numbers and estimate the number of key comparisons made by your algorithm. (10 marks) Question 3: Apply quicksort to sort the following list: Q U I C K S O R T (10 marks) in alphabetical order. Find the element whose position is unchanged in the sorted list. Question 4: Write Strassen’s matrix multiplications algorithm for obtaining the product of two matrices. (10 marks) Question 5: (i) Define DFS. Explain briefly how it differs from BFS. (10 marks) (ii) Write pseudocode for DFS and calculate its time complexity Question 6: Apply Kruskal’s algorithm to find minimal spanning tree with an example. (10 marks) Question7: Arrange the following growth rates in increasing order: O (3n), O (n2), O (1), O (n log n) Question 8: Using Principle of Mathematical Induction, prove that the sum 20 + 21 +…+ 2n is 2n +1 – 1 for all n  1.…

    • 2477 Words
    • 10 Pages
    Powerful Essays
  • Satisfactory Essays

    Ntu Eee Curriculum

    • 1105 Words
    • 5 Pages

    * EE3179 is taken in Semester 2. Those taking EE3179 (instead of EE3076) will have the additional 4 AUs counted in the GER-UE category.…

    • 1105 Words
    • 5 Pages
    Satisfactory Essays

Related Topics