All Questions
Tagged with dynamic-programming functional-programming
4 questions
3
votes
1
answer
335
views
Efficiently calculate value of Pascal's Triangle using memoization and recursion
So reading about functional programming, applications to dynamic programming, and learning Scala. I figured I would try it out with a popular example, Pascal's Triangle, tests against known values ...
1
vote
2
answers
139
views
A function to scan user input as string
I know that multiple functions are already available. However, I thought of writing my own because I wanted to learn the logic (and also because I thought there wasn't enough confusion :P). Please ...
0
votes
1
answer
67
views
Loading URLs via a case statement
I have the following code which loads in a URL based on the id of a user-clicked button. I'm looking to compress it down as much as possible, and make it more modular and reusable:
...
4
votes
1
answer
1k
views
HackerRank - Candies
Here is the solution I've written for Hacker Rank Candies challenge.
It uses dynamic programming (memoization in a boxed array).
I'm interested on what could be done to improve this code in term of ...