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

Flashcards

CS160

Rose Martinsen-Burrell Computer Science English 26 cards

Cards in this deck (26)

  1. 1What is an Algorithm?A set of unique steps to solve a solvable problem.
  2. 2What is Decomposition? (in CS)Breaking a problem into smaller steps.
  3. 3What are the two types of abstraction?Specification
    &
    Parameterization
  4. 4What are two ways to measure the complexity of an algorithm?Experimentation (measure time)
    or
    Hypothetical (big O)
  5. 5What are primitive operations?Basic operations that take one time cycle in RAM.
    (comparison, arithmetic, assignment, function calls, returning, referencing, etc.)
  6. 6What are some common big O values?1, log(n), n, n^2, n^3
  7. 7From a function how can you determine the big-O value?Drop any constants and lower-value terms
  8. 8What does Big-O measure?The worst possible runtime of an algorithm
  9. 9What does Big-Theta measure?The actual runtime of an algorithm
  10. 10What does Big-Omega measure?The best runtime of an algorithm
  11. 11Does a linked list have random access?No
  12. 12Does an array have random access?Yes
  13. 13Can an array be resized?No
  14. 14What elements make up a linked list?nodes and pointers
  15. 15In what order are items added and removed from a stack?Last in, first out. (LIFO)
  16. 16What is the method used to add an item to the stack?Push(item)
  17. 17What is the method used to remove an item from a stack?Pop()
  18. 18When should Pop() throw an error?When the stack is empty
  19. 19In what order are items added and removed from a queue?First in, first out. (FIFO)
  20. 20What is the method used to add items to the queue?Enqueue(object)
  21. 21What is the method used to remove items from the queue?Dequeue()
  22. 22What is the difference between a singly linked list and a doubly linked list?With a singly linked list, you can only travel in one direction. With a doubly linked list, you can travel in both directions.
  23. 23Does a sequence have random access?Yes
  24. 24What is a circular array?An array that wraps left to right
  25. 25How can you determine if a function uses recursion?If the function calls itself.
  26. 26What is required for recursion?A base case. (When to stop)

Information

Description
Computer Science Flashcards on CS160, created by Rose Martinsen-Burrell on 10/09/2024.
Views
2
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?