All Questions
5 questions
3
votes
2
answers
141
views
Number of possible numbers in roman number string
I just started learning programming a few months ago, and I'm intrigued by Haskell. To learn a bit I tried to adapt some code I have in Java so I can see what are equivalent solutions in Haskell.
The ...
7
votes
5
answers
504
views
Pizza Hut math problem #1 in Haskell
I'm currently attempting to learn Haskell after a fair history of imperative programming. When I saw the Pizza Hut Pi Day math problems, I thought the first one would be a good candidate for my ...
2
votes
1
answer
106
views
Accessing list elements when counting the number of rectilinear paths
I am trying to solve the RIVALS problem on SPOJ: Starting from (0, 0), how many paths are there to reach point (X, Y), only taking one-unit steps moving to the right or up? Constraints: 0 ≤ X ≤ 106, ...
5
votes
1
answer
263
views
Project Euler #15 in haskell
I've solved Project Euler #15 in Haskell, but I feel like there might be a better way to express my solution that I'm not seeing. I start out defining my types:
...
41
votes
1
answer
2k
views
Finding minimum scalar product using ST Monad
Inspired by a Stack Overflow question, I decided to practice my Haskell by taking a crack at the Google Code Jam's Minimum Scalar Product problem:
Given two vectors \$\mathbf{v_1}=(x_1,x_2,\ldots,...