Difference between revisions of "Fall 2014 Exam 2"

From CS 61A Wiki
Jump to: navigation, search
[unchecked revision][checked revision]
(Skills)
 
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Useful things will show up here in the next few days.--[[Special:Contributions/169.229.14.214|169.229.14.214]] 11:55, 22 October 2014 (PDT)
 
  
== Midterm 2 Topics ==
+
== Topics ==
 +
=== Midterm 2 Topics ===
 
Here is a list of things that we'll focus on this midterm.
 
Here is a list of things that we'll focus on this midterm.
 +
<div class="toccolours mw-collapsible">
 
* Data abstraction
 
* Data abstraction
** Functional pairs
+
* Lists
 +
* Functional pairs
 
* The sequence abstraction
 
* The sequence abstraction
** Lists
 
*** List comprehensions
 
** Ranges
 
** Strings
 
** apply_to_all, keep_if, and reduce
 
 
* For statements
 
* For statements
 +
* Ranges
 +
* Strings
 +
* List comprehensions
 
* Dictionaries
 
* Dictionaries
** Dictionary comprehensions
+
* Dictionary comprehensions
* Linked lists
+
* apply_to_all, keep_if, and reduce
* Rooted trees
+
* Linked lists (both ADT and class representation)
 +
* Rooted trees (both ADT and class representation)
 
* Mutable data
 
* Mutable data
** Identity vs. equality
+
* Nonlocal statements
** Nonlocal statements
+
* Identity vs. equality
** Object Oriented Programming
+
* Class statements
*** Class statements
+
* Invoking methods
*** Invoking methods
+
* Dot expression evaluation
*** Dot expression evaluation
+
* Attribute assignment
*** Attribute assignment
+
* Bound methods vs functions
*** Bound methods vs functions
+
* Class vs instance attributes
*** Class vs instance attributes
+
* Inheritance
*** Inheritance
+
* str and repr strings
*** Property methods
+
 
* Interfaces
 
* Interfaces
** str and repr strings
+
* Property methods
** Type dispatching
+
* Special methods
** Type Coercion
+
* Type dispatching
** Special methods
+
* Type Coercion
 
* Counting calls and frames
 
* Counting calls and frames
** Memoization
+
* Memoization
 
* Orders of growth
 
* Orders of growth
 
* Sets
 
* Sets
 
* Binary search trees
 
* Binary search trees
 +
</div>
  
== Midterm 1 Topics ==
+
=== Midterm 1 Topics ===
The upcoming midterm is cumulative, meaning you're expected to be familiar following midterm 1 topics.
+
'''The upcoming midterm is cumulative, meaning you're expected to be familiar following midterm 1 topics.'''
 +
<div class="toccolours mw-collapsible mw-collapsed">
 
* Primitive expressions
 
* Primitive expressions
 
* Call expressions
 
* Call expressions
Line 65: Line 67:
 
* Mutual recursion
 
* Mutual recursion
 
* Tree recursion
 
* Tree recursion
 +
</div>
 +
  
 
== Skills ==
 
== Skills ==
 +
* Draw Box and pointer diagrams for mutable data structures
 +
* Drawing Environment diagrams with nonlocal
 +
* Reading the problem critically/figuring out what the problem is asking
 +
* Understanding doctests
 +
* Designing classes for Object Oriented Programming problems
 +
* Identifying the Theta of a function
 +
 +
'''All the skills from Exam 1 still apply:'''
 
* Identifying the Operator and Operands
 
* Identifying the Operator and Operands
 
* Identifying Domain and Range
 
* Identifying Domain and Range
* '''Drawing Environment Diagrams!'''
+
* Environment Diagrams
 +
 
 +
 
 +
== Reviews and Guides ==
 +
* [https://d1b10bmlvqabco.cloudfront.net/attach/hoxc5uu6sud761/gozdkhgdUbT/htdlpko411i0/Python__Immutable_vs_Mutable.pdf Immutable vs Mutable data]
 +
* [http://www.ocf.berkeley.edu/~shidi/cs61a/61a-fa13-midterm2-walkthrough.pdf Complete walk-through of Fall 2013 Midterm 2]
 +
* [http://youripark.github.io/tutorials.html Youri's tutorials (environment diagrams, OOPs, Orders of Growth)]
 +
* [https://docs.google.com/document/d/1TxfKmM3MlH032hjSUh92I0kQDVcvmitTSzYObGMr8Bk/edit?usp=sharing Guide to Orders of Growth and Function Runtime]
 +
 
 +
== Practice Problems ==
 +
* [https://piazza.com/class/hx2jz3h2i112h8?cid=2493 Environment Diagram Practice]
 +
* [http://albertwu.org/cs61a/review/mt2 Albert Wu's Midterm 2 Practice Problems]
 +
* [https://docs.google.com/document/d/1RlXy9xpyRE8JPbEDrU4YSoxR5f4N2QAgFCwPodzOPYc Andrew Huang's Midterm 2 Review Questions]
 +
* [http://markmiyashita.com/cs61a/sp14/ Mark Miyashita's old TA website]
 +
* [http://youripark.github.io/practice.html Youri Park's Practice Problems]
 +
 
 +
=== Guerrilla Section Worksheets ===
 +
* [http://tinyurl.com/kpuxa32 Sequences, Data Abstraction, and Nonlocal] ([https://docs.google.com/a/berkeley.edu/document/d/1l-p6X81H0Ovv0A8apJuqRoNtVCQd3zBGvX5cRydOIus/edit#heading=h.gjdgxs Solution])
 +
* [https://docs.google.com/a/berkeley.edu/document/d/1jNw2buNjlCDObUF8EUUMXyBN4QgEWD1uQJ0_9A6-AyU/edit OOP and Recursive Objects] ([https://docs.google.com/a/berkeley.edu/document/d/1jNw2buNjlCDObUF8EUUMXyBN4QgEWD1uQJ0_9A6-AyU/edit Solutions])
 +
 
 +
== Practice Midterms ==
 +
... Can be found on the [[Past exams]] page.
 +
===Problems to Focus on from [[Past exams]]===
 +
'''Not comprehensive, but a good start'''
 +
 
 +
Can be sorted by year or by Topic! (Default is by topic)
 +
 
 +
<strong>Note: Replace Rlist with Link</strong>
 +
{| class="wikitable sortable"
 +
! Question
 +
! Topic
 +
|-
 +
| Fall 2011 Midterm 1 (4)
 +
| Data Abstraction
 +
|-
 +
| Spring 2014 Midterm 2 (3)
 +
| Data Abstraction
 +
|-
 +
| Summer 2014 Midterm 1 (6)
 +
| Data Abstraction
 +
|-
 +
| Summer 2012 Midterm 1 (6)
 +
| Linked Lists (Deep irlists => Deep Linked Lists)
 +
|-
 +
| Summer 2014 Midterm 1 (4)
 +
| Linked Lists
 +
|-
 +
| Summer 2014 Midterm 2 (8)
 +
| Linked Lists and Python Lists (challenging)
 +
|-
 +
| Summer 2014 Midterm 2 (2b)
 +
| Environment Diagrams with Mutable Objects
 +
|-
 +
| Summer 2013 Midterm 2 (3a)
 +
| Environment Diagrams with Mutable Objects
 +
|-
 +
| Fall 2013 Midterm 2 (2b)
 +
| Environment Diagrams with Mutable Objects
 +
|-
 +
| Summer 2013 Final (3a)
 +
| Environment Diagrams with Mutable Objects
 +
|-
 +
| Spring 2013 Midterm 2 (1a)
 +
| Environment Diagrams with Mutable Objects
 +
|-
 +
| Spring 2013 Final (2)
 +
| Environment Diagrams with Mutable Objects
 +
|-
 +
| Fall 2012 Midterm 2 (2b)
 +
| Environment Diagrams with Mutable Objects
 +
|-
 +
| Summer 2014 Midterm 2 (2a)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Summer 2013 Midterm 2 (3b)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Summer 2013 Final (3a)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Fall 2013 Midterm 2 (2a)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Spring 2013 Midterm 2 (2a)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Fall 2012 Midterm 2 (2a)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Fall 2012 Final (2b)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Summer 2012 Final (8)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Fall 2011 Midterm 2 (1b)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Fall 2011 Final (2a)
 +
| Environment Diagrams with Nonlocal
 +
|-
 +
| Summer 2012 Midterm 2 (2)
 +
| Using Nonlocal
 +
|-
 +
| Fall 2011 Midterm 2 (1a)
 +
| Using Nonlocal
 +
|-
 +
|-
 +
| Summer 2014 Midterm 2 (3)
 +
| Python3 Lists
 +
|-
 +
| Fall 2013 Midterm 2 (1)
 +
| Python Lists
 +
|-
 +
| Summer 2013 Midterm 2 (1)
 +
| Python Lists
 +
|-
 +
| Fall 2013 Final (2a)
 +
| Python Lists
 +
|-
 +
| Fall 2012 Midterm 2 (1a, 4b)
 +
| Python Lists
 +
|-
 +
| Fall 2012 Final (1a)
 +
| Python Lists
 +
|-
 +
| Summer 2012 Midterm 2 (1)
 +
| Python Lists
 +
|-
 +
| Fall 2011 Midterm 2 (2)
 +
| Python Lists
 +
|-
 +
| Summer 2013 Midterm 2 (4)
 +
| Dictionaries
 +
|-
 +
| Summer 2012 Final (11)
 +
| Dictionaries
 +
|-
 +
| Summer 2014 Midterm 2 (7)
 +
| Trees
 +
|-
 +
| Summer 2014 Midterm 1 (5)
 +
| Trees
 +
|-
 +
| Summer 2013 Midterm 2 (5, 6)
 +
| Trees
 +
|-
 +
| Fall 2013 Midterm 2 (3c)
 +
| Trees
 +
|-
 +
| Fall 2013 Final (4c, see r_list object in 4b)
 +
| Trees
 +
|-
 +
| Spring 2013 Final (1)
 +
| Trees
 +
|-
 +
| Fall 2012 Midterm 2 (3b)
 +
| Trees
 +
|-
 +
| Fall 2012 Final (3b, 3d)
 +
| Trees
 +
|-
 +
| Fall 2011 Midterm 2 (4e)
 +
| Trees
 +
|-
 +
| Summer 2014 Midterm 2 (1)
 +
| Object Oriented Programming
 +
|-
 +
| Summer 2013 Final (2, 6)
 +
| Object Oriented Programming
 +
|-
 +
| Spring 2013 Midterm 2 (1b, 5)
 +
| Object Oriented Programming
 +
|-
 +
| Fall 2013 Midterm 2 (3a, 4)
 +
| Object Oriented Programming
 +
|-
 +
| Fall 2013 Final (4b)
 +
| Object Oriented Programming
 +
|-
 +
| Spring 2013 Final (5)
 +
| Object Oriented Programming
 +
|-
 +
| Fall 2012 Midterm 2 (1b, 3a)
 +
| Object Oriented Programming
 +
|-
 +
| Fall 2012 Final (3a)
 +
| Object Oriented Programming
 +
|-
 +
| Summer 2012 Midterm 2 (4, 5)
 +
| Object Oriented Programming
 +
|-
 +
| Summer 2012 Final (9)
 +
| Object Oriented Programming
 +
|-
 +
| Fall 2011 Midterm 2 (3)
 +
| Object Oriented Programming
 +
|-
 +
| Fall 2011 Final (1)
 +
| Object Oriented Programming
 +
|-
 +
| Summer 2013 Final (4)
 +
| Generic Functions
 +
|-
 +
| Summer 2014 Midterm 1 (8)
 +
| Orders of Growth
 +
|-
 +
| Summer 2012 Final (2)
 +
| Orders of Growth
 +
|-
 +
| Summer 2013 Midterm 2 (2)
 +
| Orders of Growth
 +
|-
 +
|}

Latest revision as of 15:25, 25 October 2014

Topics

Midterm 2 Topics

Here is a list of things that we'll focus on this midterm.

  • Data abstraction
  • Lists
  • Functional pairs
  • The sequence abstraction
  • For statements
  • Ranges
  • Strings
  • List comprehensions
  • Dictionaries
  • Dictionary comprehensions
  • apply_to_all, keep_if, and reduce
  • Linked lists (both ADT and class representation)
  • Rooted trees (both ADT and class representation)
  • Mutable data
  • Nonlocal statements
  • Identity vs. equality
  • Class statements
  • Invoking methods
  • Dot expression evaluation
  • Attribute assignment
  • Bound methods vs functions
  • Class vs instance attributes
  • Inheritance
  • str and repr strings
  • Interfaces
  • Property methods
  • Special methods
  • Type dispatching
  • Type Coercion
  • Counting calls and frames
  • Memoization
  • Orders of growth
  • Sets
  • Binary search trees

Midterm 1 Topics

The upcoming midterm is cumulative, meaning you're expected to be familiar following midterm 1 topics.

  • Primitive expressions
  • Call expressions
  • Import statements
  • Expression trees
  • Assignment statements
  • Pure and non-pure functions
  • Def statements and user-defined functions
  • Applying user-defined functions
  • Environments
  • Environment diagrams
  • Arithmetic operators
  • Local assignment
  • Conditional statements
  • Boolean contexts
  • Boolean operators
  • Iteration with while statements
  • Passing functions as arguments
  • Nested def statements
  • Functions as returned values
  • Lambda expressions
  • Currying
  • Recursive functions
  • Mutual recursion
  • Tree recursion


Skills

  • Draw Box and pointer diagrams for mutable data structures
  • Drawing Environment diagrams with nonlocal
  • Reading the problem critically/figuring out what the problem is asking
  • Understanding doctests
  • Designing classes for Object Oriented Programming problems
  • Identifying the Theta of a function

All the skills from Exam 1 still apply:

  • Identifying the Operator and Operands
  • Identifying Domain and Range
  • Environment Diagrams


Reviews and Guides

Practice Problems

Guerrilla Section Worksheets

Practice Midterms

... Can be found on the Past exams page.

Problems to Focus on from Past exams

Not comprehensive, but a good start

Can be sorted by year or by Topic! (Default is by topic)

Note: Replace Rlist with Link

Question Topic
Fall 2011 Midterm 1 (4) Data Abstraction
Spring 2014 Midterm 2 (3) Data Abstraction
Summer 2014 Midterm 1 (6) Data Abstraction
Summer 2012 Midterm 1 (6) Linked Lists (Deep irlists => Deep Linked Lists)
Summer 2014 Midterm 1 (4) Linked Lists
Summer 2014 Midterm 2 (8) Linked Lists and Python Lists (challenging)
Summer 2014 Midterm 2 (2b) Environment Diagrams with Mutable Objects
Summer 2013 Midterm 2 (3a) Environment Diagrams with Mutable Objects
Fall 2013 Midterm 2 (2b) Environment Diagrams with Mutable Objects
Summer 2013 Final (3a) Environment Diagrams with Mutable Objects
Spring 2013 Midterm 2 (1a) Environment Diagrams with Mutable Objects
Spring 2013 Final (2) Environment Diagrams with Mutable Objects
Fall 2012 Midterm 2 (2b) Environment Diagrams with Mutable Objects
Summer 2014 Midterm 2 (2a) Environment Diagrams with Nonlocal
Summer 2013 Midterm 2 (3b) Environment Diagrams with Nonlocal
Summer 2013 Final (3a) Environment Diagrams with Nonlocal
Fall 2013 Midterm 2 (2a) Environment Diagrams with Nonlocal
Spring 2013 Midterm 2 (2a) Environment Diagrams with Nonlocal
Fall 2012 Midterm 2 (2a) Environment Diagrams with Nonlocal
Fall 2012 Final (2b) Environment Diagrams with Nonlocal
Summer 2012 Final (8) Environment Diagrams with Nonlocal
Fall 2011 Midterm 2 (1b) Environment Diagrams with Nonlocal
Fall 2011 Final (2a) Environment Diagrams with Nonlocal
Summer 2012 Midterm 2 (2) Using Nonlocal
Fall 2011 Midterm 2 (1a) Using Nonlocal
Summer 2014 Midterm 2 (3) Python3 Lists
Fall 2013 Midterm 2 (1) Python Lists
Summer 2013 Midterm 2 (1) Python Lists
Fall 2013 Final (2a) Python Lists
Fall 2012 Midterm 2 (1a, 4b) Python Lists
Fall 2012 Final (1a) Python Lists
Summer 2012 Midterm 2 (1) Python Lists
Fall 2011 Midterm 2 (2) Python Lists
Summer 2013 Midterm 2 (4) Dictionaries
Summer 2012 Final (11) Dictionaries
Summer 2014 Midterm 2 (7) Trees
Summer 2014 Midterm 1 (5) Trees
Summer 2013 Midterm 2 (5, 6) Trees
Fall 2013 Midterm 2 (3c) Trees
Fall 2013 Final (4c, see r_list object in 4b) Trees
Spring 2013 Final (1) Trees
Fall 2012 Midterm 2 (3b) Trees
Fall 2012 Final (3b, 3d) Trees
Fall 2011 Midterm 2 (4e) Trees
Summer 2014 Midterm 2 (1) Object Oriented Programming
Summer 2013 Final (2, 6) Object Oriented Programming
Spring 2013 Midterm 2 (1b, 5) Object Oriented Programming
Fall 2013 Midterm 2 (3a, 4) Object Oriented Programming
Fall 2013 Final (4b) Object Oriented Programming
Spring 2013 Final (5) Object Oriented Programming
Fall 2012 Midterm 2 (1b, 3a) Object Oriented Programming
Fall 2012 Final (3a) Object Oriented Programming
Summer 2012 Midterm 2 (4, 5) Object Oriented Programming
Summer 2012 Final (9) Object Oriented Programming
Fall 2011 Midterm 2 (3) Object Oriented Programming
Fall 2011 Final (1) Object Oriented Programming
Summer 2013 Final (4) Generic Functions
Summer 2014 Midterm 1 (8) Orders of Growth
Summer 2012 Final (2) Orders of Growth
Summer 2013 Midterm 2 (2) Orders of Growth