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 can't seem to understand the difference between q-learning and utility learning clearly, I know that q learning means learning the utility of actions available to a state rather than learning the utility of each state(util learning).
But when it com...
I have already got the correct answer for a question but I think I have a better version of the answer which is much less lines of code, am I still allowed to test and resubmit my code to see if it runs?
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...
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...
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...
Just curious, can count sort handle negative numbers, if so how cause we only leaned how to make an array from 0 to n and even if i think about it, I can't think of a way to implement an array which accounts for -ve ints as we are only making an arra...
https leetcode.com discuss general-discussion 1083445 how-quick-sort-works-and-the-problems-that-can-be-solved-using-partition-logic very interesting resource if you need an example to understand.
I am able to get the correct answer however, when it comes to bigger input, my code still takes more than 5 seconds, I think this could be because I'm converting each element in an int first running a loop through it, correct me if I'm wrong.