<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CS 61B on berkeley.notes</title><link>https://rohan-mantena.github.io/notes/docs/cs61b/</link><description>Recent content in CS 61B on berkeley.notes</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://rohan-mantena.github.io/notes/docs/cs61b/index.xml" rel="self" type="application/rss+xml"/><item><title>Complexity and Algoritmic Analysis</title><link>https://rohan-mantena.github.io/notes/cs61b/complexity/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rohan-mantena.github.io/notes/cs61b/complexity/</guid><description>https://joshhug.gitbooks.io/hug61b/content/chap8/chap82.html
Considerations # in regards to an engineer, there are some crucial things to consider -&amp;gt; operational cost, the development costs, the maintenacne costs, and costs of failure is the program fast enough (purpose + input data factor in) the space - memory, disk space - dephends on input data as well and, scale (as input gets big) execution cost, that is, the cost of execution in terms of time and space/memory, is referred to as time complexity and space complexity</description></item><item><title>Packages and Access</title><link>https://rohan-mantena.github.io/notes/cs61b/packages/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rohan-mantena.github.io/notes/cs61b/packages/</guid><description>Non netsted classes or interfacnes may be public or package private
Classes without a modifier are package private (only accesible within the same package)
Members of a class (attriubes/fields/instance variables, methods, constructors, nested types) can be any of the four access levels
Access is based on static not dynamic types -&amp;gt; class not object
Only override a method with one that is at least as permissive</description></item><item><title>Collections, Amortization</title><link>https://rohan-mantena.github.io/notes/cs61b/collections/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rohan-mantena.github.io/notes/cs61b/collections/</guid><description>not needed?</description></item><item><title>Integers</title><link>https://rohan-mantena.github.io/notes/cs61b/integer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rohan-mantena.github.io/notes/cs61b/integer/</guid><description>Integers Types and Literals # the range of values for signed types -2^N .. 2^N - 1 (there is 1 less value for posivite values to account for 0) the range of values for unsigned types 0 .. 2^N - 1
(N is the number of bits)
how do we handle &amp;lsquo;overflow&amp;rsquo;, numbers that are so large they are outside the range, java employs modular arithmetic (&amp;lsquo;wrapping around&amp;rsquo;)</description></item><item><title>Project 2: Ataax</title><link>https://rohan-mantena.github.io/notes/cs61b/project2/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rohan-mantena.github.io/notes/cs61b/project2/</guid><description>Ataax is a 2 person game with red and blue pieces played on a 7x7 board
How the Game is Played # Intially, there are pieces in all four corners and the red player goes first red in top left / bottom right (a7/g1) blue in top right / bottom left (a1/g7) Play continues until there are no moves left or there has been 25 consecutive jumps between both players winner is player with the most pieces at the end of the game if you have no pieces, you lose to tie; players must have same # of pieces neither player can make a move OR the max number of jumps (25 consecutive between players) has been reached two kinds of moves Extending: place a new piece of your color next to an existing piece (horizontally, vertically, diagonally adjacent) Jumping: move a piece of your color to a square that is no more than 2 rows and 2 columns away all opposing pieces that are touching (previously empty) square are replaced by your color a player can only pass if you cannot move at the beginning of the game, you can set blocks, pre-filled squares that may never be moved or or moved to they are symmetrical about the center reflected along x and y axis config &amp;lsquo;file&amp;rsquo; may list a square on the right side of the board but another block must be placed symmetrically on the left side as well Commands # there are commands that player inputs into the textual interface (GUI for EC) do EC Starting and Ending Games # new : Abandons the current game (if one is in progress), clears the board to its initial configuration, and starts a new game.</description></item><item><title>Sequences (+ Assorted Design Topics)</title><link>https://rohan-mantena.github.io/notes/cs61b/sequences/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rohan-mantena.github.io/notes/cs61b/sequences/</guid><description>Topics include; views, maps, sentienls, stacks, adapters, and more.
Views # views (concept) are an alternative presentation of (interface to) an existing object : view implements inteface of object a not concrete analogy for a view is a pointer into object Map Views? # Partial Implementations # the idea of taking advantage of the fact that operations are releated for designers, this can be used by implementing existing concrete types or interfaces.</description></item><item><title>Sorting</title><link>https://rohan-mantena.github.io/notes/cs61b/sorting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rohan-mantena.github.io/notes/cs61b/sorting/</guid><description>why sorting? supports searching (binary, equal items, same val for property, what are my nearest neighbor, etc) &amp;ndash; see convex hull (cs 170)
formal definition: a soring algorithm (or sort) permutes (re-arranges) a sequece of elements to bring them into order, according to some total order. - a total order is : Total: All items can be compared with one another Reflexive: An item can be compared to itself Antisymmetric: x &amp;lt;= y AND y &amp;lt;= x IFF y == x Transitive: If x &amp;lt;= y and y &amp;lt;= z, then x must be &amp;lt;= z - a sort that does not change the relative order of equivalent entries (compared to input) is called stable (consider sorting dictionary defs for same word, ignoring defition - unstable)</description></item></channel></rss>