[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-670907-105":59,"doc-detail-670907-en":130,"doc-similar-670907":162},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","cs61b-data-structures-midterm-1-spring-2019","CS61B Data Structures - Midterm 1 - Spring 2019","","UC Berkeley CS61B Data Structures Midterm #1 (Spring 2019) is a 320-point, 110-minute closed-book exam with a single double-sided written cheat sheet allowed. It includes nine questions over 10 pages, requiring candidates to show work, write identification details on each page, and sign the academic integrity statement. The exam provides grading guidance on partial credit, advises tackling familiar problems first, and specifies symbol meanings for multiple-choice style answers.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":20,"@type":76,"position":81},"https://docshare.wps.com/document/exam/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/cs61b-data-structures-midterm-1-spring-2019/670907/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/cs61b-data-structures-midterm-1-spring-2019/670907.png","ImageObject",300,407,{"name":92,"@type":93},"Nguyễn Văn Học","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-12-02","2026-11-01",true,{"@type":102,"interactionType":103,"userInteractionCount":34},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What materials are allowed for this CS61B midterm?","Question",{"text":112,"@type":113},"The exam is closed book, but one double-sided handwritten cheat sheet is allowed. No calculators or other electronic devices are permitted.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What is the required time limit and point total?",{"text":117,"@type":113},"The exam should be completed in 110 minutes and is worth a total of 320 points.",{"name":119,"@type":110,"acceptedAnswer":120},"How does the exam handle incomplete answers and extra complexity?",{"text":121,"@type":113},"Partial credit may be available for incomplete answers. Points may be deducted if answers are much more complicated than necessary, so write as much as you can while staying efficient.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},670907,1793572666,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":19,"category_name":20,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":34,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":19,"preview_urls":145},1374402739827,"https://ap-avatar.wpscdn.com/avatar/14000c97e7351f1a627?x-image-process=image/resize,m_fixed,w_180,h_180&k=1787885694763230660","UC Berkeley – Computer Science  \nCS61B: Data Structures  \nMidterm \\#1, Spring 2019  \nThis test has 9 questions across 10 pages worth a total of 320 points, and is to be completed in 110 minutes. The exam is closed book, except that you are allowed to use one double sided written cheat sheet (front and back) . No calculators or other electronic devices are permitted. Give your answers and show your work in the space provided. Write the statement out below in the blank provided and sign. You may do this before the exam begins.  \n“I have neither given nor received any assistance in the taking of this exam.”  \nSolutions are in BETA. Updated 2/22/19  \nSignature:    \n\n| \\# | Points | \\# | Points |\n| --- | --- | --- | --- |\n| 0 | 1 | 6 | 55 |\n| 1 | 24 | 7 | 28 |\n| 2 | 24 | 8 | 55 |\n| 3 | 0 | 9 | 58 |\n| 4 | 35 |  |  |\n| 5 | 40 |  |  |\n|  |  | TOTAL | 320 |\n\nName:   CS61olutions  SID:   GitHub Account \\# : sp19-s  Person to Left’s \\# : sp19-s  Person to Right’s \\# : sp19-s  Exam Room:    \nTips:  \n• There may be partial credit for incomplete answers. Write as much of the solution as you can, but bear in mind that we may deduct points if your answers are much more complicated than necessary.  \n• There are a lot of problems on this exam. Work through the ones with which you are comfortable first. Do not get overly captivated by interesting design issues or complex corner cases you’re not sure about.  \n• Not all information provided in a problem may be useful, and you may not need all lines.  \n• Unless otherwise stated, all given code on this exam should compile. All code has been compiled and executed before printing, but in the unlikely event that we do happen to catch any bugs in the exam, we’ll announce a fix. Unless we specifically give you the option, the correct answer isnot ‘does not compile.’  \n• ○ indicates that only one circle should be filled in.  \n• □ indicates that more than one box may be filled in.  \n• For answers which involve filling in a ○ or □, please fill in the shape completely.  \nUC BERKELEY  \nGitHub Account \\#: sp19-s    \n0. So it begins (1 point). Write your name and ID on the front page. Write the exam room. Write the IDs of your neighbors. Write the given statement and sign. Write your GitHub account \\# (e.g. sp19-s185) in the corner of every page. Enjoy your free point J.  \n1. Static Swap.  \na) (12 points) Consider the class shown below. On each line with a swap method, fill in the boxes for every variable that is changed by that swap method call. If a swap method causes no change, fill in “none” for that line. No syntax errors or runtime errors occur.  \npublic class StaticSwap { public static int staticX = 5;  \npublic static int staticY = 10;  \npublic static void swap(int x, int y) { int temp = x; x = y; y = temp;  \n}  \npublic static void staticSwap(int x, int y) {  \nint temp = staticX; staticX = staticY; staticY = temp;}  \npublic static void main(String[] args) {  \nint a = 5;  \nint b = 10;  \nswap(a, b);  \nswap(staticX, staticY);  \nstaticSwap(a, b);  \nstaticSwap(staticX, staticY);}  \n}  \n□ a □ b □ staticX □ staticY ☒ none  \n□ a □ b □ staticX □ staticY ☒ none  \n□ a □ b ☒ staticX ☒ staticY □ none  \n□ a □ b ☒ staticX ☒ staticY □ none  \nb) (12 points) Now imagine that every variable was of type String instead of type int. No syntax errors or runtime errors occur. Assume swap and staticSwap have been redefined to take Strings.  \npublic static String staticX = “goose”;  \npublic static String staticY = “hare”; public static void main(String[] args) {  \nString a = “moose”;  \nString b = “bear”;  \nswap(a, b);  \nswap(staticX, staticY); staticSwap(a, b);  \nstaticSwap(staticX, staticY);  \n□ a □ b □ staticX □ staticY ☒ none  \n□ a □ b □ staticX □ staticY ☒ none  \n□ a □ b ☒ staticX ☒ staticY □ none  \n□ a □ b ☒ staticX ☒ staticY □ none  \nCS61B MIDTERM 1, SPRING 2019 GitHub Account \\#: sp19-s    \n2. JUnit (24 points). The Object class in Java defines the equals method as shown below. public boolean equals(Object obj) { return (t","cbCairP4GRfT9h41","https://ap.wps.com/l/cbCairP4GRfT9h41","pdf",274699,11,"English","# Exam Instructions\n## Policy and Allowed Materials\n## Answer Presentation and Integrity Statement\n# Tips for Working Through Problems\n# Question 1: Static Swap\n## (a) int version variable effects\n## (b) String version variable effects\n# Question 2: JUnit\n## Dog equals and assertEquals behavior\n# Question 3: PNH","[{\"question\":\"What materials are allowed for this CS61B midterm?\",\"answer\":\"The exam is closed book, but one double-sided handwritten cheat sheet is allowed. No calculators or other electronic devices are permitted.\"},{\"question\":\"What is the required time limit and point total?\",\"answer\":\"The exam should be completed in 110 minutes and is worth a total of 320 points.\"},{\"question\":\"How does the exam handle incomplete answers and extra complexity?\",\"answer\":\"Partial credit may be available for incomplete answers. Points may be deducted if answers are much more complicated than necessary, so write as much as you can while staying efficient.\"}]","CS61B Data Structures - Midterm 1 - Spring 2019 | PDF",28,[146,150,154,158],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/172c57e80529f0f328887b2a43f153bc.webp",983,1272,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/648d6c906a247d2adb844013ace68ea9.webp",982,1270,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/52283822eb9b7db8f53785f33fe99e7c.webp",981,1269,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/56a943d39562d7a8463e6bea86dc7ff3.webp",980,1268,{"list":163,"token":66},[164,170,176,183,189,195,202,208,214,220],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":52,"category_name":20,"create_tm":169},322275,"EECS 485 Midterm Exam Fall 2016 - Solution","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229908763218/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=AW6i6knf7mg1hBQmuBoaFdkxZiQ%3D","eecs-485-midterm-exam-fall-2016-solution",1789962294,{"doc_id":171,"doc_title":172,"file_type":137,"home_preview_img_url":173,"slug":174,"view_count":44,"category_name":20,"create_tm":175},394220,"CSE105 Spring 2017 - Study guide for Exam 1","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229918201484/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=KiCAo2HE%2Bu5NloNz69mHhbIZ8L8%3D","cse105-spring-2017-study-guide-for-exam-1",1790400461,{"doc_id":177,"doc_title":178,"file_type":137,"home_preview_img_url":179,"slug":180,"view_count":181,"category_name":20,"create_tm":182},313842,"Exam Credit chart - Updated","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229907641301/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=KRpWkg4rbH9Ygu7nYzlw8AUfkfE%3D","exam-credit-chart-updated",25,1789899464,{"doc_id":184,"doc_title":185,"file_type":137,"home_preview_img_url":186,"slug":187,"view_count":81,"category_name":20,"create_tm":188},670912,"COS 226 Algorithms and Data Structures - Midterm - Fall 2011","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988703946/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=aa39IPQw3V%2BCbXirEaqYwEPl%2FQg%3D","cos-226-algorithms-and-data-structures-midterm-fall-2011",1793572678,{"doc_id":190,"doc_title":191,"file_type":137,"home_preview_img_url":192,"slug":193,"view_count":29,"category_name":20,"create_tm":194},459768,"CS230 Deep Learning - Winter Quarter 2019 Midterm Examination","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229925954993/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=Bkt30C7mbhNngq%2FJhmyj%2BSWSogo%3D","cs230-deep-learning-winter-quarter-2019-midterm-examination",1790756830,{"doc_id":196,"doc_title":197,"file_type":137,"home_preview_img_url":198,"slug":199,"view_count":200,"category_name":20,"create_tm":201},394235,"MATH 218 - Practice Midterm Examination 3","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229918205594/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=JAhm546gvtf1arz5kvx%2FDzNY%2FIE%3D","math-218-practice-midterm-examination-3",16,1790400794,{"doc_id":203,"doc_title":204,"file_type":137,"home_preview_img_url":205,"slug":206,"view_count":81,"category_name":20,"create_tm":207},728475,"FP - Singapore CA Qualification (Foundation) Examination - 5 December 2025 - Singapore Taxation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230030284841/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=BsE8epsBdGSuQ1fLnv9oXbztmnw%3D","fp-singapore-ca-qualification-foundation-examination-5-december-2025-singapore-taxation",1795291754,{"doc_id":209,"doc_title":210,"file_type":137,"home_preview_img_url":211,"slug":212,"view_count":44,"category_name":20,"create_tm":213},394371,"EECS 16A Spring 2020 - Designing Information Devices and Systems I - Final Exam Instructions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229918018046/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=gaoTy6Yx3YWDo3VqtInAzlv3Cys%3D","eecs-16a-spring-2020-designing-information-devices-and-systems-i-final-exam-instructions",1790402512,{"doc_id":215,"doc_title":216,"file_type":137,"home_preview_img_url":217,"slug":218,"view_count":139,"category_name":20,"create_tm":219},160248,"EECS 16B Spring 2019 - UC Berkeley Final Exam","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229871974368/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=lw5oW8HDiA1475p9IHPDS75itfg%3D","eecs-16b-spring-2019-uc-berkeley-final-exam",1788052744,{"doc_id":221,"doc_title":222,"file_type":137,"home_preview_img_url":223,"slug":224,"view_count":44,"category_name":20,"create_tm":225},394217,"CISC 672 - Advanced Compiler Construction - Midterm Exam Study Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229918201058/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796574779&Signature=bzE%2FKW9q30zfIX%2BimyyXJae1zFE%3D","cisc-672-advanced-compiler-construction-midterm-exam-study-guide",1790400419]