Connecting...

This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Introduction to Java
For more information, please see full course syllabus of Introduction to Java
Introduction to Java Algorithms: Iteration
Lecture Description
In this lesson, our instructor Tom Quayle goes through an introduction on algorithms: iteration. He starts by discussing iteration, for loop and while loop, two-dimensional range, and using two nested while loop. He then moves on to finding minimum and ma
Bookmark & Share
Embed
Share this knowledge with your friends!
Copy & Paste this embed code into your website’s HTML
Please ensure that your website editor is in text mode when you paste the code.(In Wordpress, the mode button is on the top right corner.)
×
Since this lesson is not free, only the preview will appear on your website.
- - Allow users to view the embedded video in full-size.
Next Lecture
Previous Lecture
1 answer
Mon May 5, 2014 4:24 PM
Post by Bobby Dong on May 1, 2014
Professor Quayle:
For the Inserting in Order algorithm, the program shifts everything towards the end of the array when a new value is inserted. However, what if the array is set at length = n (current number of items in an array). When I run the program, will I get an ArrayOutOfBoundsException or will I get a runtime error?
1 answer
Mon Dec 24, 2012 5:36 PM
Post by Alex Moon on December 23, 2012
Please answer this question.
On the example with Inserting an Order into an array, there is
a[k] = a[k-1];
whenever
a[k-1] > newValue
You describe as the "8" as being moved to the right, and the space in the original box being opened up. The original 8 doesn't disappear immediately does it? I see the shifting as "copying"
1 answer
Last reply by: xueping liu
Fri Apr 19, 2013 1:16 PM
Post by Vivaldo Ribeiro on June 8, 2012
Some people can't see a cow infront of them!
The professor is awesome.