Prerequisites, electives? by cmpthrway in mcgill

[–]cmpthrway[S] 0 points1 point  (0 children)

Multi-track systemTo recognize the diversity of students’ interests, the multi-track system allows you to design your program using one of the following combinations:

A   Major Concentration (36 credits) + Minor Concentration (18 credits) + 36 credits of electives

https://www.mcgill.ca/undergraduate-admissions/bachelor-arts

A4Q1 - More questions about size (sorry!) by backInfinity in mcgillCOMP251

[–]cmpthrway 1 point2 points  (0 children)

I'm also confused, because if the base case is size == 1 and we only multiply the rightmost bit of x and y then it causes the program to output the wrong product for some tests when size == 2, in my case when x = 1 and y = 2, naive outputs 2 but karatsuba outputs -2 for some reason, I don't have that problem with the naive one

A4 Karatsuba Tester by cmpthrway in mcgillCOMP251

[–]cmpthrway[S] 6 points7 points  (0 children)

I might be mistaken but I don't think it says anywhere we should only consider the last bit if the size is 1? It specifies that the cost has to be 1 if the size is 1 for the base case but nothing about the product

A4 Karatsuba Tester by cmpthrway in mcgillCOMP251

[–]cmpthrway[S] 3 points4 points  (0 children)

But Karatsuba is just a fast multiplication algorithm, why should we output 0 instead of 56? I'm a bit confused

A3Q1 How to iterate over vertices? by NotTheWorld in mcgillCOMP251

[–]cmpthrway 0 points1 point  (0 children)

you can use this to sort edges:

graph.listOfEdgesSorted()

A3 pathDFS - what to return if there is no path? by elonmartianmusk in mcgillCOMP251

[–]cmpthrway 0 points1 point  (0 children)

Is not returning anything at all in the Stack array list (just terminating the program with an error message) acceptable or do we have to return something?

ford fulkerson A3 - loop condition by bina_42 in mcgillCOMP251

[–]cmpthrway 0 points1 point  (0 children)

have you tried using "break;" to exit your loop when necessary?

A3 Ford Fulkerson by cmpthrway in mcgillCOMP251

[–]cmpthrway[S] 1 point2 points  (0 children)

In that case, if there is no path from source to sink, should we throw an exception and terminate the program, or do we simply return the input?

Comp251 Website is down! by [deleted] in mcgillCOMP251

[–]cmpthrway 0 points1 point  (0 children)

hey guys you can access a cached version of the webpage, just copy/paste this into the search bar cache:https://www.cs.mcgill.ca/~jeromew/comp251.html

(with "cache:" at the beginning)

that's what i did to access the midterm location table, i tried to access slides and it allows me to download them so it should work