Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

CS 61B Lecture 5: Iteration and Arrays I

Loading...

Sign in or sign up now!
24,431
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 24, 2008

CS 61B: Data Structures - Fall 2006

Instructor Jonathan Shewchuk

Fundamental dynamic data structures, including linear lists, queues, trees, and other linked structures; arrays strings, and hash tables. Storage management. Elementary principles of software engineering. Abstract data types. Algorithms for sorting and searching. Introduction to the Java programming language.

http://www.cs.berkeley.edu/

Category:

Education

Tags:

Download this video

LICENSE: Creative Commons (Attribution-Noncommercial-No Derivative Works).

For more information about this license, please read: http://creativecommons.org/licenses/by-nc-nd/3.0/.

High-quality MP4 Learn more

  • likes, 3 dislikes

Link to this comment:

Share to:

Top Comments

  • extremely clear! Very interesting for students of Informatics.

  • He Made an error in 10:23 where he changes the IsPrime Method to use for Loop he forgot to Erase at the end the divisor++; because he has it in the for loop so it does not make sence to have divisor++; in the end of the program will not work like it suppose to!!

see all

All Comments (23)

Sign In or Sign Up now to post a comment!
  • Thank you Gentlemen;

    {I will now go to have a wonder cup of English tea[]}

  • Arrays in java are objects...i agree of that... but where did they fit in the class hierarchy. any answer please..

  • @spartanfry no worries. just cuz it was a month ago, doesnt mean i wasnt still struggling. thanks!

  • @xwowsersx Sorry about that, I did not notice this was posted a month ago until after I posted the comment.

  • @spartanfry yea, i meant "but 9 ISN'T prime." Doesn't matter anyways...figured it long ago.

  • @xwowsersx 9 isn't prime...

  • Wrote out the Sieve of Eratosthenes by hand to work through the algorithm. I used a boolean array of size 11 and ran through it by hand. Can't seem to see where the loop sets 9 to be false. I was left with 4, 6, 8, 10 set to false, and 2, 3, 5, 7, and 9 set to TRUE. But 9 is prime, so what am I missing here?

  • good man with great knowledge......

  • 8:34 his voice cracks =), what a great teacher this man is.

  • I performed the sieve prime example and set 'n' to ten and it printed out all primes up to ten. Is that the correct result? I'm a Flash programmer so I simply changed the syntax for AS3.0 and wrote a class. Unfortunately, I don't think you can actually create a Boolean array in AS (possibly as a 'rest array' as a function argument and set the return value as Boolean(?)), so I simply created an array and set it to true in the 'for' loop.

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more