Please consider offering answers and suggestions to help other students!
And if you fix a problem by following a suggestion here,
it would be great if other interested students could see a short
"Great, fixed it!" followup message.
I encourage you to have a think about this question, which may help you figure out understand the solution If we somehow knew the set of potions and swords we would be using, does the order you use them matter?
and also if anyone can explain the need for
"if dist u is not None "
but BFS doesn't need it
in Dijkstra's, I've rewatched that section explanation a few times but couldn't really understand why.
Hi there I just watched Lecture 14 and had a question. Would it be correct to say that all shortest path trees are spanning tree but not the other way around? Thanks
The trick to this problem is determining the optimum number of potions to take. We don't want to know whether taking the next potion does more damage than using the next sword. We rather want to know whether taking the next potion does more damage th...
The way I thought of solving this problem was similar to the hints, take all the potions if the remaining hp after the potion is less than a sword. If it isn't skip the potion and take a sword. This doesn't seem to work as in some cases, taking lesse...
Hi
The Distinct Platforms problem from lab6 seems to be set up the same way as the midsem exam - the samples are not available to us.
Would you be able to make them available?
Thanks
I would encourage you to make sure you are comfortable with the other techniques. In particular, try implementing it with a stack manually, as all the recursive solution is doing is a trick to use the call stack rather than having to make your own. I...
update, recession seems to work properly in everything but just getting max depth error in the largest cases, is there a way to still do top down through recursion then?
I tried this problem using top down approach(recursion), it worked on smaller test cases and failed on bigger, another thing was that it was giving me (answer-1) for bigger test cases, I read the hints and tried the bottom up with Kahn's and it works...
Yes, Python has a recursion depth limit that defaults to 1000 in the most common implementation (CPython). This can be adjusted programmatically, but in Python I would generally prefer to just use an iterative implementation. There is no mathematical...
You appear to have misread the problem statement in a couple of ways. Please read it again carefully and see if you can find the parts of the statement that make your solution invalid.
I will give you one as a hint, but there is another issue besides ...
I used recursion to solve this problem in my first try, it solved all the test-cases except the last one giving a max recursive depth error, I then used stack and iterative method and seemed to have passed all the cases, after a bit of research(chatg...
For sample 2 from the pdf
4 5 2
98.67
.S.1.
. 4 .
32..5
The time taken for this maze to be solved is 15. As manually solving it, it only takes 14.
S- 9 1
9- 8 2
8- 7 4
7- 6 5
6- 5 7
5- 4 9
4- 3 11
3- 2 12
2- 1 14
I don't get into any issues ...
ANONYMOUS wrote
You will be unsurprised to learn that this is an extant field of study.
I am not quite following the "little guy" architecture you are describing, but various models of computation have been studied differentiated by the capabilities a...
Details of the Mid-Semester Test including sample questions have been released on LMS. See the Mid-Semester Test (https lms.uwa.edu.au webapps blackboard content listContentEditable.jsp?content id 3978892 1 course id 90614 1 mode reset) link in ...