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

    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

    Think about trying a community college first. It is a cheaper way to finish some general education classes. It is always possible to transfer to a ...…

    • 569 Words
    • 3 Pages
    Satisfactory 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
  • Powerful Essays

    Searching and Sorting Streams and Files Graphics GUI Components and Events Mouse, Keyboard, Sounds, and Images Big-O Analysis of Algorithms The Java Collections Framework Lists and Iterators Stacks and Queues Recursion Revisited Binary Trees Lookup Tables and Hashing Heaps and Priority Queues Design Patterns…

    • 3908 Words
    • 16 Pages
    Powerful 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
  • Good Essays

    Java

    • 490 Words
    • 3 Pages

    Write a Java program to demonstrate using bitmaps and bitwise operators to sort and remove duplicates from a file of random phone numbers. Do not confuse the term bitmap used for compressing data into smaller spaces with the bitmap that has come to mean a graphic image.…

    • 490 Words
    • 3 Pages
    Good 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
  • 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
  • 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
  • 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
  • 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