CS 20 Quiz #1 Questions and Correct Answers |
Latest Update
Algorithm Ans: Taking input into output through a set of rules
Data Ans: Factual information used for reasoning, discussion, or
calculation. Can be processed or transmitted digitally
Information Ans: Processed form of data
Structures Ans: Groupings of related elements or objects
© 2026 Assignment
Data structure Ans: Foundational concepts used to organize and
process data efficiently. Organized collection of data elements that
Guru01 - Stuvia
support operations.
Expert
1-D Array: Max # of elements Ans: UB - LB + 1
Memory address of element with index k Ans: L(x(k)) = B + W * (k - LB)
2-D Array: Max # of elements Ans: M x N
Memory address of element with index i,k (Row Major Order - C, C++)
Ans: L(x([i][j])) = B + W ((i -LB) N + (j - LB))
Memory address of element with index i,k (Column Major Order -
MATLAB) Ans: L(X([i][j])) = B + W ((i - LB) + (j - LB) M)
Traversal Ans: Access each element 1 by 1
Searching Ans: Find a specific value
Sorting Ans: Arrange in ascending or descending order
Insertion Ans: Add new data elements
Deletion Ans: Remove existing data elements
Updating/Modification Ans: Change value of existing data