• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 30 pages
Exam (elaborations)

UC Berkeley CS 61B Midterm 2 Exam Fall 2025–2026 | Complete Questions & Solutions.

Document preview thumbnail
Preview 3 out of 30 pages

UC Berkeley CS 61B Midterm 2 Exam Fall 2025–2026 | Complete Questions & Solutions.

Content preview

01345 6789 
 8
3


0
1234!"5
6#$
78%95&:;
$!<=
%'>5(&!)(*%++,+-,./
01234567895?@8A=B@5CD>5
012345?@8A=B@5B;<=5@75E7895F=G>5
012345?@8A=B@5B;<=5@75E78959HIJ@>5
6785J;K=5LLM5<HB8@=NO5P=9=5;9=5Q5R8=N@H7BN57S5K;9EHBI5T9=AH@O5ULMM5V7HB@N5@7@;FW
X =N@H7B> L Y Z [ \ ] Q ^7@;F
07HB@N> L\ L] L\ L\ _ L] L[ LMM
`795R8=N@H7BN5aH@J5b"cb&c%d dd)$e5N=F=T@57BFE5 `795R8=N@H7BN5aH@J5$k &c)%d
l)$e5E785<;E5N=F=T@5
7B=5TJ7HT=5U@J=9=5HN57BFE57B=5T799=T@5;BNa=9WO 7B=5795<79=5TJ7HT=N5UN=F=T@5;FF5@J;@5;VVFEWO
fBN=F=T@=A57V@H7B5UT7<VF=@=FE58BgFF=AW 6785T;B5N=F=T@
D7Bh@5A75@JHN5UH@5aHFF5i=5I9;A=A5;N5HBT799=T@W <8F@HVF=5NR8;9=N
jBFE57B=5N=F=T@=A57V@H7B5UT7<VF=@=FE5gFF=AW D7Bh@5A75@JHN5UH@5aHFF5i=5I9;A=A5;N5HBT799=T@W
mnBE@JHBI5E785a9H@=578@NHA=5@J=5;BNa=95i7o=N5795E785T97NN578@5aHFF5B7@5i=5I9;A=AO5CS5E785a9H@=5<8F@HVF=5
;BNa=9N5795E7895;BNa=95HN5;<iHI878Ne5a=5aHFF5I9;A=5@J=5p
c$!5HB@=9V9=@;@H7BO
mfBF=NN57@J=9aHN=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S5;B5|`}5I9;A=5;BA5;59=S=99;F5@75@J=5~=B@=95S795?@8A=B@5~7BA8T@O


0;I=5L57S5ZM

,012356789 
 



69!"#8$%$8 &'6()* '+ 8!8,8!9$79-96(9"9$.8/'7!09#''12/'7!83
435)
6
7
8 9 : ;
< = >
?1)1@A,6"9$!B07,,6!$%$8 8,8!9$! C% ,)D%"E%E67'#&$%$%"8#F'8.!$/'7G
6 7 8 9 : ; < = >
HI3

J
:"8!$096$$%$''12/'7!879"K7@96#7,'"E$!B):68!" ,'"E"$50( L''!!7 $%/'7!
81$%867.%120"9E'7!"/)
6:'!)6"!$%'8.!$/'70!6"$E996$&$%$%"8#F'8.!$/'7)
7M87):68C ,'0567E67'#!!".96N1207NO0NP)
M87):68C ,'0567E67'#!!".96N1207NP0NO)
8090:0;M87)Q67E9!!".9$%96#@8090:0;B!O0$%9"$!,89$!P0$%9"$!.89#,89$
@6B!12)
<0=0>:'!)<%!A9E!$68!@80706B0(%"E% 9!$%$$%88$' !$A/'7!.8 $8$%9
<)* 8R680<E996$&$%$%"8#F'8.!$/'7)* ! 8.7 9$,,'"!R68=9#>)
?1)S@S,6"9$!B07,,6!$%$8 8,8!9$!&"985! 8E%$8 )D%"E%E67'#&$%$%"8#F'8.!$/'7G
6 7 8 9 : ; < = >
HI3

J
* $%8 '8.!$"$ !80:0;0!"9E$%58$%"$ !.8 $8$%96)
T7$6R$%!$%8 "$ !0:"!! ''8$%99#;)* 8R680:"!$%$%"8#F'8.!$"$ )




U.S6RA2

, 01 234567967457 2 
9065743632424222232743573242222242
357

5224567
5762362624272 664!
" # $ % & '
( )
*+,-./+01
(7
522456724272 664624222233663 233663

422223360
2345426463252457
3247
53%
423 2336032345426463252457

24247
53&
960657436322236757762422452363423422664257"552
4234762553542!
" $ %
( )
*+,-./+01
425776245236253
2$2(2"2)2%
980657434234422749&533454
24247):5334253424222232743;;;;;;;;
224645673446
657427<
=572 =>2 "? @672
*+,-./+01

577222&53764
24247)A
>7222&53764
24247)A
9 9F
  E D
6 8 B C C B 9 6
D E 9F   8
(742"?2&G
27
G)236252&G)




H
263F

Document information

Uploaded on
October 9, 2026
Number of pages
30
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$18.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
wisenurse
5.0
(1)
Sold
48
Followers
2
Items
1272
Last sold
20 hours ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions