Jump to content

Talk:Arithmetic evaluation: Difference between revisions

→‎Bigger than a task?: Supplement pages?
(→‎Use of libraries?: Fine with me)
(→‎Bigger than a task?: Supplement pages?)
Line 11:
:: To be honest, I'd put it in with "riddles" more than anything. It's a pretty standars CS101 task and the generic answer says that you use two stacks, one for the numbers and one for the operators. Thus this really boils down to "implement a stack". Of course that doesn't mean that someone might not have a particularly clever solution that would teach a lot about the way some language works. (Just because I find a task uninteresting doesn't mean someone else does the same). The reason I would put this in "puzzles" is that all languages I actually use have an arithmetic evaluator built-in. Thus "assign a value to an array" is an operation I do actually perform in my code, but "parse arithmetic strings" is not.[[User:Sgeier|Sgeier]] 14:46, 24 January 2008 (MST)
:::That makes sense. It's at least ''different'' from a regular task. A prefix notation "small programming language" interpreter (with just addition and multiplication and strings) was actually a project for my CS3 class (the CS classes are 200-level at my school). We did it using a tree rather than a stack, but that was for prefix notation. --[[User:Mwn3d|Mwn3d]] 14:51, 24 January 2008 (MST)
:The per-language examples are pretty darned big. Does anybody else see a need for cutting the larger examples off into supplement pages? --[[User:Short Circuit|Short Circuit]] 18:23, 22 February 2008 (MST)
 
== D solutions ==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.