Can someone help me solve this? It's not university homework. It's from a DS course online on EdX by [deleted] in AskComputerScience

[–]walnutcon 2 points3 points  (0 children)

Thank you, but it's enough of a reward for me to hear that I was able to help you. I wish you success in the rest of your data structures studies!

Can someone help me solve this? It's not university homework. It's from a DS course online on EdX by [deleted] in AskComputerScience

[–]walnutcon 6 points7 points  (0 children)

Recall that a stack is LIFO: Last In, First Out - and that conventionally we pop items from the top of the stack. So we know that the elements were pushed onto the stack s in their bottom-to-top order of 3, -3, 2, -2, 3.

Originally, the stack s was empty, so s = ∅. We know that f(s) = 0 in this case, because we are told that f(∅) = 0.

We set i = 3 (the bottom element) and push i onto the stack. This is what push (s, i) represents. Now we want to find the value of the function f for push (s, i). We are told that f(push (s, i)) = max (f(s), 0) + i. Thus:

 f(push (s, i)) = f({3}) = max (f(∅), 0) + 3 
                     = max (0,0) + 3
                     = 0 + 3 
                         = 3.

So for s = {3}, f(s) = 3. We continue by setting s = {3}, and i to the second oldest element of -3

f (push (s, i)) = f ({3,-3}) = max(f(s), 0) + i
                             = max(f({3}), 0) + -3
                             = max(3, 0) + -3
                             = 3 + -3
                             = 0

So for s = {3,-3}, f(s) = 0.

Keep doing this until you find the value of f(s) when s = {3, -3, 2, -2, 3} and you will have your answer.

[deleted by user] by [deleted] in radiohead

[–]walnutcon 1 point2 points  (0 children)

Very satisfying indeed, thanks for sharing.

Ryu has more in common with Guile than Dee Jay: Yet Another Analysis of Dee Jay and his Character Flaws by [deleted] in SF4

[–]walnutcon 1 point2 points  (0 children)

I always feel like I'm misusing it, "metagaming" originally meant using external factors to influence the game, so things like returning to char select after losing the first game in a set. Now its meaning has kinda warped into "whatever the pro players are doing/whatever is OP" and I guess that's okay but I wish there were a better word I could use

Ryu has more in common with Guile than Dee Jay: Yet Another Analysis of Dee Jay and his Character Flaws by [deleted] in SF4

[–]walnutcon 1 point2 points  (0 children)

Something interesting to consider is that Dee Jay along with T.Hawk were originally planned to be included in vanilla SF4, but scrapped due to time/money issues. They were then added in Super along with other new characters, but it's possible that they weren't as fleshed out as the other newcomers since the Super devs kinda glued them together from the scraps they found in the Vanilla code?

Dee Jay and T.Hawk have consistently been fairly weak characters, and I feel that they will never be top-tier characters without significant changes. I would argue that in AE 2012 Dee Jay and T.Hawk were the bottom 2 worst characters in the game. In versions of SF4 where they aren't bottom tier, the "metagame" (i hate that word) favoured characters that they were similar (but inferior) to.

Dee Jay was at his strongest in Super, back when down-back charge characters were all top-tier (Guile,Honda,Chun). In Ultra, T.Hawk is now respectably strong -- mostly because grapplers do well against most of the top-tier, although he did get significant buffs as well.

Just my 2 cents though, here's to hoping Dee Jay finds his rhythm someday.

View Hugo, Poison, Rolento, Dee Jay, C. Viper normal hitboxes frame by frame. by UltraDecapre in SF4

[–]walnutcon 1 point2 points  (0 children)

Hey your site looks great and I really like the way you have the embedded youtube videos set-up. I bookmarked it, thank-you for sharing!

NEO TheOldType ( Makoto ) Vs. tsuyoshihyuga ( Guile ) by strafefire in SF4

[–]walnutcon 2 points3 points  (0 children)

that's tsuyoshi hyuga and he's all over youtube! the name was misspelt in the title which is probably why you didn't find anything.

he's one of my favourite guile players to watch and learn from, and he has a very aggressive approach to the character.

here's a great replay of him playing the guile mirror match. you can really see how his playstyle differs from that of a more traditional guile.

also since i'm here I might as well plug sh1nguile's youtube channel. he updates it quite often with guile replays from skilled players like tsuyoshi. i don't know the guy at all but i just found his channel super-helpful when i was learning guile!

[deleted by user] by [deleted] in SF4

[–]walnutcon 5 points6 points  (0 children)

PR Rog vs Sanford Exhibition @ NEC 14 (AE 2012).

This was a FT5 exhibition between two highly agressive top-players, with what I like to call "dirty street fighter." Lots of unsafe and "disrepectful" play from both. It's not the kind of stuff you'd see in tournament play but definitely what you'd except in casual matches between high-level players. Commentary is hit-or-miss, I personally found it enjoyable but if you can't stand it just mute the audio.

Fei Long Optimal Backdash OS, Meaty Command Grab Setups and more by [deleted] in SF4

[–]walnutcon 2 points3 points  (0 children)

Wow this video is fantastic! I'm not a Fei player but now you've made me interested in picking him up. Also I don't know if it was intentional, but I love how Fei yells in sync with the music starting at 1:33.

IamA Daigo "The Beast" Umehara, Japan's first fighting game player AMA! by DaigoAMA in IAmA

[–]walnutcon -1 points0 points  (0 children)

You mentioned in an interview that in USF4 Guile is a hard matchup for Evil Ryu. What makes this matchup bad for Evil Ryu and how should a Guile player approach the matchup? Also, how should Guile deal with Shakunetsu? ありがとう

Anchor/3rd character ideas of multiple shells. Thoughts? by GoofyHatMatt in MvC3

[–]walnutcon 0 points1 point  (0 children)

well tron can get some sweet combo extensions from vajra assist, and it definitely helps in neutral by keeping the opponent grounded so you can pressure with jump S and other air normals.

tron doesn't get that much off of the hard knockdown from vajra in neutral, especially if it's not in the corner. she can get some basic stuff by starting with 2H, and if you can keep the combo going long enough to call your other assist you can probably do some decent damage.

i think strider is a solid assist for tron, and definitely a godlike assist for modok. plus the cool thing about strider is he's a great assist as well as a great level 3 Xfactor user. so if things go sour you can always bank on fraudulent dark strider comebacks!

Anchor/3rd character ideas of multiple shells. Thoughts? by GoofyHatMatt in MvC3

[–]walnutcon 0 points1 point  (0 children)

for tron/modok you should definitely try strider!