The runtime speed of the solution is a criterion of this challenge. "Faster, faster would be better."

learn more… | top users | synonyms

0
votes
1answer
106 views

Challenge: take ciphered text and decipher, also print out if it was offset to the left or right

Problem: Take input text like this: (all input should be considered strings) Upi djpi;f ytu yu[omh pmr yp yjr ;rgy. And figure out if it was offset left or offset right (on a standard qwerty ...
3
votes
3answers
333 views

The making of “Spot It!”: Finding almost unique sets

Puzzle: Find a deck of c cards, each containing p pictures, such that no two pictures match on a given card, and exactly 1 picture on each card matches exactly 1 picture on each of the other cards, ...
3
votes
2answers
524 views

Fastest code to find the next prime

The problem is as follows. Input: An integer n Output: The smallest prime bigger than n. The challenge is to give the fastest code possible to do this. I will test the code on values starting at ...
5
votes
6answers
395 views

Count the number of cyclic words in an input

Cyclic Words Problem Statement We can think of a cyclic word as a word written in a circle. To represent a cyclic word, we choose an arbitrary starting position and read the characters in ...
0
votes
4answers
403 views

Race to a Million

This falls under the Code puzzles the best. Fastest way to render the numbers 1-million in a web browser. Preferably using PHP, but use what you must. Numbers must be more than one on a line in the ...
5
votes
3answers
493 views

Longest non-repeating Game-of-Life sequence

Given a positive integer N, determine the starting pattern on a N x N-grid that yield the longest non-repeating sequence under Game of Life-rules, and ends with a fixed pattern (cycle of length 1), ...
3
votes
3answers
401 views

Secret Santa Challenge [duplicate]

Possible Duplicate: Holiday Gift Exchange Background: Secret Santa is a Western Christmas tradition in which members of a group or community are randomly assigned a person to whom they ...
2
votes
1answer
140 views

Bob's Financial Planning (Maximize)

Bob's Financial Planning Bob lives in Pecunia. It is a small island city completely governed by the Pecunia City Council (PCC). PCC has decided to encourage foreign investments in the city by waiving ...
5
votes
2answers
658 views

Fastest semiprime factorization

Write a program to factorize a semi-prime number in the shortest amount of time. For testing purposes, use this: 38!+1 (523022617466601111760007224100074291200000001) It is equal to: ...
-2
votes
1answer
341 views

tic-tac-toe data structure design challenge [closed]

Design a data structure such that getWinner method runs in O(1) time. Assume you call put(x, y, Player) for each move. Best space efficient solution wins.
2
votes
2answers
180 views

given prime factors of a number, what is the fastest way to calculate it's proper divisors? [closed]

Given prime factors of a number, what is the fastest way to calculate divisors? clc; clear; sms=0; count = 1; x=0; for i=11:28123 fac = factor(i); sm = 1; for j = 1:length(fac)-1 ...
1
vote
2answers
221 views

List ALL prime-factorized natural numbers in ANY order

This is a variant of List prime-factorized natural numbers up to N in ascending order, but the solutions can be very different. Write a program that outputs prime factorizations of all natural ...
2
votes
2answers
255 views

List prime-factorized natural numbers up to N in ascending order

For a given n list prime factorization of all natural numbers between 1 and n in ascending order. For example, for n = 10 the output would be: 1: 2: 2^1 3: 3^1 4: 2^2 5: 5^1 6: 2^1 3^1 7: 7^1 8: 2^3 ...
2
votes
2answers
408 views

Help johnny to solve this Puzzle

Scenario Little Johnny wants to play with his friends today. But his babysitter won't let him go! After a lot of begging, the heartless nanny gives him her brand new electronic puzzle and says: "If ...
0
votes
3answers
288 views

Prime tester + nth-prime finder (TO BE CLOSED) [duplicate]

Possible Duplicate: List of first n prime numbers most efficiently and in shortest code This is to be closed soon - please don't answer (mod- please close!) This challenge is to write the ...

1 2 3
15 30 50 per page