% is the remainder operator. % is not a modulus operator.
In java the remainder operator is designed to follow the following identity for all integers a and b such that b is not 0 (since n / 0 is undefined for all n):
(a / b) * b + (a % b) == a
So in the example, 7 % -3, we enter in the following numbers:
imagine if he just scratched his nails down the chalk board.
BuckMarley 2 weeks ago
he could get on my nerves. kinda pompous
cannykicks 1 month ago
Hot teacher lol
SirAvalord 1 month ago
7 mod -3 = -2 but 7 % -3 = 1
% is the remainder operator. % is not a modulus operator.
In java the remainder operator is designed to follow the following identity for all integers a and b such that b is not 0 (since n / 0 is undefined for all n):
(a / b) * b + (a % b) == a
So in the example, 7 % -3, we enter in the following numbers:
(7 / -3) * -3 + (7 % -3) = 7
Integer arithmetic discards partial numbers.
(-2) * -3 + (7 % -3) = 7
6 + (7 % -3) = 7
(7 % -3) = 1
rs4lmno4 3 months ago
'pus', 'goo'. LOL
0x28 3 months ago
If only other lecturers would be like him.
0x28 3 months ago
Dr. Schewchuk is an excellent lecturer! These videos have helped me so much!
dacole82 8 months ago
he writes so cool lol
ssjg0ten 8 months ago
Great lecture.
iMPRE7ed 8 months ago
Thank you, Professor Swag!
kprasad 8 months ago
slow projector screen :P
Killable1337 8 months ago
I didn't know John Malkovich was a professor
vikkinn 9 months ago 4
I'm in love.
licka 11 months ago
why dont all universities post online lectures.....
jimmyjubejube 11 months ago 7
@jimmyjubejube because not all professors are open minded I guess.
pithikoulis 10 months ago
@jimmyjubejube One of our professors said that it's forbidden to share data to the outside world, including footage/audio.. bah.
0x28 3 months ago
like the lecture..... funny handwriting nevertheless it helped me a lot!
carlisle21yaps 1 year ago
Great teacher!
mchekin 1 year ago
yay no homework for next friday!
popDPx 1 year ago 3
This has been flagged as spam show
I am gay and I find Jonathan immensely attractive. Can I attend his lectures?
jackketchum1 1 year ago
Comment removed
jackketchum1 1 year ago
Comment removed
jackketchum1 1 year ago
Comment removed
jackketchum1 1 year ago
This has been flagged as spam show
This is awesome, definitely helped me out in my data structures class [2]
2009kblo 1 year ago
This has been flagged as spam show
Very informative. Just to point that the Load Factor should be somewhere between 0.5 and 0.75.
If it's smaller than 0.5, we are wasting memory space.
If its greater than 0.75, each bucket will contain plenty of elements (which form Singly Linked List) in case of Closed Bucket Hash Tables.
Oor there will be Big Clusters of elements in case of Open Bucket Hash Tables.
greeppl 1 year ago
Comment removed
greeppl 1 year ago
Thanks for the upload. The lecture was a million times better than the lecture I attended in York University !
MuGGs82 1 year ago
This is great! Thanks for putting these online!
awakeTooOften 2 years ago
he makes me remind John Malkovich with long hair :P
nice lectures by the way !
fermixx 2 years ago
so what about an associative array??
are asssocitave arrays internally Hashtables...?
for instance (in java script) if I have:
//declare and initialise the associative array (dictionary)
var dic = [];
dic["hello"]="guten tag";
dic["goodbye"]="aufwiedersehen";
dic["thank you"]="danke shoen";
var translated_word = dic["thank you"];//finds the German translation
... any comments, opinions, answers???
sigimarti 2 years ago
i believe associative array or even the HashTable in Java is actually indexed by some tree. Just guessing
poonhokong 2 years ago
@sigimarti associative arrays are like elements in a hash table.
Hash tables are structures used to store them.
mastermax1989 1 year ago
For those who are looking for Hash Codes (and how to compute them), see the next lecture.
Lioobayoyo 2 years ago 2
Comments on upper blackboards are so funny :) lol
mtasic1985 2 years ago
Thanks..The lecture was very informative.
kiara2803kiara 2 years ago 2
interesting. this is the only one I've really understood of the ones I've listened to.
freetothinkify 2 years ago
Very helpful and nicelly explained :)
Good work!
MetaBrainX 2 years ago 22
This is awesome, definitely helped me out in my data structures class.
elektrosaurus 2 years ago 15
rate me 1-10 n
ba2rn3 3 years ago
This has been flagged as spam show
anyone want to chat? i am bored and just got my new computer! it has a webcam!!! v
Joeanthem 3 years ago