All Questions
Tagged with programming-challenge clojure
32 questions
5
votes
1
answer
278
views
Hackerrank: Breaking the records
I'm learning Clojure and am a rank n00b at it, trying to learn from books and online tutorials (but I'm sometimes concerned that I am picking up bad habits or at least not all the good habits). For ...
2
votes
2
answers
296
views
Project Euler problem 86 taking a long time
I'm trying to solve problem 86 in Project Euler. After some tinkering, I managed to unroll the DP solution into a loop. But still the solution takes >150s to complete. What can I do to improve the ...
2
votes
2
answers
210
views
Project Euler #10 (sum of primes less than two million) in Clojure
I'm new to Clojure and using some Project Euler problems to familiarize myself with the language's capabilities. Problem #10 asks to find the sum of all primes less than two million.
I wanted to ...
2
votes
1
answer
138
views
Program finds the first almost matching string in a list - Advent Of Code 2018 Day 2 Part 2
Advent of Code 2018, day 2, part 2:
The [two IDs you are looking for] differ by exactly one character at the same position in both strings. For example, given the following IDs:
...
2
votes
2
answers
320
views
Project Euler #49: Find 12-digit number concatenating a three terms sequence
First of all, project Euler has been a great help for me to learn Clojure. I tried for months trying to get web projects going but ended up frustrated with and struggling with tooling and libraries ...
3
votes
1
answer
289
views
Solving Knight's Travails Problem without using vector for position
I'm trying to implement a solution to the The Odin Project - Project 2: Knight’s Travails in Clojure (Functional Programming) based on the solution posted by benjdelt.
I would like to know your ...
2
votes
2
answers
179
views
Find the middle of the string
The follow code should correctly run the test cases at the bottom.
It works correctly.
I just don't feel like this is clearest way I could write it.
A lot of the complexity comes from having to ...
3
votes
2
answers
195
views
Code Chef RAINBOW Palindrome
Problem
Determine whether an array is "Rainbow", i.e. it has the following
structure:
First a1 elements equal 1.
Next a2 elements equal 2.
Next a3 elements equal 3.
Next a4 elements ...
5
votes
2
answers
167
views
Bringing Clojure to project Euler 19
I recently began learning Clojure for fun, and after completing the koans, I decide that project Euler would provide my next challenge. Here is the problem statement:
(If someone knows how to put ...
3
votes
2
answers
178
views
Project Euler #11 - Largest product in a grid
Problem statement
I've tried to solve the following Euler problem in a very straight-forward way, ideally avoiding recursion if possible and writing it in a functional style.
What is the greatest ...
1
vote
1
answer
142
views
Project Euler #6 - Sum square difference
I'd like to get the code below reviewed on all aspects, specifically I wonder if it's common usage to use let like this, as currently more computations are done in ...
4
votes
2
answers
98
views
Project Euler #3
I'd like to have the code below reviewed on all aspects.
Task: Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?
My ...
4
votes
1
answer
195
views
Project Euler #1 - Revisited
I'm learning Clojure and solved Project Euler #1, I'd like to have my code reviewed on all aspects. I'm marking this as follow-up of Project Euler #1 because I answered my own question and implemented ...
4
votes
1
answer
145
views
Project Euler #1
I'm learning Clojure and solved Project Euler #1, I'd like to have my code reviewed on all aspects and have one specific question. This is also my first Functional Programming language, I have however ...
6
votes
1
answer
158
views
PE4: Largest Palindrome Product (Clojure)
I solved Project Euler 4 using Clojure Lisp.
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest ...