GoConqr has a new look! Let us know what you think.

Flashcards

Sequential Search and Selection Sort

Amar Malik English 15 cards

Cards in this deck (15)

  1. 1Algorithm AttributesCorrectness
    Efficiency
    Ease of Understanding
    Elegance
  2. 2Algorithm EfficiencyAn algorithms' use of time and space
  3. 3BenchmarkingTiming an algorithm on a standard data set
  4. 4Two primary algorithmsSearching algorithm
    Sorting algorithm
  5. 5Searching algorithmTask of finding a specific value in a list of values or deciding it's not there
  6. 6Sorting algorithmsTask of putting a list of values into numeric or alphabetical order
  7. 7Sequential Search (Linear Search)List DOES NOT need to be sorted
    3 scenarios:
    Best Case Scenario
    Worse Case Scenario
    Average Case Scenario
  8. 8Sequential Search: Best Case ScenarioOnly have to process 1 item
  9. 9Sequential Search: Worse Case ScenarioHave to process every item
    N for N items
  10. 10Sequential Search: Average Case ScenarioN/2 for N items
  11. 11Selection SortFind the largest value in the unsorted part of the list
    Swap value from STEP 1 with the last value in the unsorted part of list
    Repeat STEPS 1 AND 2 until there is one value remaining in the unsorted part of list
  12. 12How do you find the number of passes in an algorithm?N-1
  13. 13How do you find the number of swaps in an algorithm?N-1
  14. 14How do you find the number of exchanges in an algorithm?N
  15. 15How do you find the number of comparisons in an algorithm?N(n-1)/2

Information

Description
Flashcards on Sequential Search and Selection Sort , created by Amar Malik on 16/09/2019.
Created by
Amar Malik
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?