FlashKeepers

Computer Science · College · College and University

Data Structures, Unit 1: Arrays and Strings

Data Structures, unit: Arrays and Strings. 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 1 of 10 in Data Structures. It opens with "What is an array?" and "What is the time complexity of accessing an array element by index?". 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 an array?
Show answerA fixed-size, contiguous block of memory storing elements of the same type
What is the time complexity of accessing an array element by index?
Show answerO(1), constant time
What is the time complexity of inserting an element at the end of a dynamic array (amortized)?
Show answerO(1) amortized
What is the time complexity of inserting an element at the beginning of an array?
Show answerO(n), since all existing elements must shift
What is a dynamic array?
Show answerAn array that automatically resizes itself when it runs out of capacity
What happens when a dynamic array's underlying storage is full and a new element is added?
Show answerA new, larger array is allocated and existing elements are copied over
What is amortized time complexity?
Show answerThe average cost per operation over a sequence of operations, smoothing out occasional expensive ones
What is a multidimensional array?
Show answerAn array of arrays, such as a 2D grid used for matrices
What is a string, in terms of its underlying data structure?
Show answerTypically an array (or sequence) of characters
What is string immutability?
Show answerA property where a string's contents cannot be changed after creation, common in languages like Python and Java
What is a substring?
Show answerA contiguous sequence of characters within a larger string
What is string concatenation?
Show answerJoining two or more strings together into one
What is the time complexity of searching for an element in an unsorted array?
Show answerO(n), linear time
What is the time complexity of searching for an element in a sorted array using binary search?
Show answerO(log n)
What is an index out of bounds error?
Show answerAn error from accessing an array position beyond its valid range

23 more cards in the app

Study this set free