FlashKeepers

Computer Science · College · College and University

Data Structures, Unit 10: Searching and Complexity Analysis

Data Structures, unit: Searching and Complexity Analysis. Core concepts, terminology, and worked-example cues a college student meets for this unit, building on prior units without repeating them. Front: a term, concept, or short problem cue. Back: the definition, explanation, or answer.

About this set

38 basic cards for College Computer Science. Set 10 of 10 in Data Structures. It opens with "What is a search algorithm?" and "What is linear search?". Study it alongside the other College sets below.

38 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is a search algorithm?
Show answerAn algorithm for finding a specific element or condition within a data structure
What is linear search?
Show answerChecking each element in sequence until the target is found or the list ends
What is the time complexity of linear search?
Show answerO(n)
What is binary search?
Show answerRepeatedly halving a sorted list's search range by comparing the middle element to the target
What is the time complexity of binary search?
Show answerO(log n)
What precondition must be true for binary search to work correctly?
Show answerThe data must already be sorted
What is Big O notation used for?
Show answerDescribing the upper bound of an algorithm's time or space complexity as input size grows
What does O(1) time complexity mean?
Show answerConstant time, unaffected by input size
What does O(n) time complexity mean?
Show answerLinear time, growing proportionally with input size
What does O(n^2) time complexity mean?
Show answerQuadratic time, common in algorithms with nested loops over the input
What does O(log n) time complexity mean?
Show answerLogarithmic time, where the problem size is repeatedly halved
What does O(n log n) time complexity mean?
Show answerLinearithmic time, typical of efficient comparison-based sorting algorithms
What is best-case complexity?
Show answerThe minimum time or space an algorithm requires, under the most favorable input
What is worst-case complexity?
Show answerThe maximum time or space an algorithm requires, under the least favorable input
What is average-case complexity?
Show answerThe expected time or space an algorithm requires, averaged over typical inputs

23 more cards in the app

Study this set free