Questions tagged [puzzle]

DO NOT USE - prefer constructive questions, or use more descriptive tags. Otherwise, your question might be appropriate for codegolf.stackexchange.com.

DO NOT USE - prefer constructive questions, or use more descriptive tags. Otherwise, your question might be appropriate for CodeGolf.


The questions tagged "puzzle" are essentially programming questions, that are as good as solving puzzles. These can be contrasted to the real-life problems, which are comparatively easy to solve.

859 questions
-1
votes
2 answers

Fast way of comparing how "different" an int[] array is from another int[] array

I am trying to figure out a fast way to compare how "different" an int array is from another int array. I am going to use this function in a sliding puzzle solver. Here is an example: {0,1,3,2,4,5,7,6,8} {0,1,2,3,4,5,6,7,8} Here, 4 elements…
mrQWERTY
  • 4,039
  • 13
  • 43
  • 91
-1
votes
1 answer

Puzzle on Probability of 7 people being seen or ignored

I have a question. Suppose i have 7 people sitting next to each other. A B C D E F G When i say "look", the people can either look towards their right or left. The Question is : - What is the probability that "A" and "G" could be ignored? - What is…
-1
votes
1 answer

How to glow a UIButton randomly from a sequence of buttons continuously

I am working on a memory based matching puzzle game. For that I need to glow buttons randomly from sequence. I have been googling sample puzzles,games & code snippets since a week or so, yet I was unable to trace out an appropriate sample project or…
Eshwar Chaitanya
  • 942
  • 2
  • 13
  • 34
-1
votes
2 answers

Getting the exponent of a floating number in C

So I am trying to return the exponent value for f. If x is infinity or NaN I need to return Tmax. f is to be interpreted as the bit-level representations of single-precision floating point values and yes I mean to pass in an unsigned variable. I…
Shaw
  • 169
  • 1
  • 3
  • 12
-1
votes
1 answer

What is impossible?

Hi recently i appeared in an aptitude,there was a problem that i realy cant understand please provide some idea, how to solve it.(and sorry to for poor English.) (Question)-> Three candidates, Amar, Birendra and Chanchal stand for the local…
-1
votes
3 answers

How to find all possible n-elements subsets of a set?

For a set of k-elements, I need to find all possible n-element subsets (n < k). How should I approach this problem? Just a suggestion will be helpful Thanks!
user1315305
  • 1,329
  • 2
  • 11
  • 20
-1
votes
1 answer

VS c# puzzle game

I am following this tutorial to make a c# puzzle game, http://jetgamedev.blogspot.ro/2012/05/lesson-0229-c-lab-4-create-image-puzzle.html. My problem is at step 77 of the tutorial, it can't find any PictureBox class so I've added Form1 as parent…
user2194683
  • 105
  • 2
  • 2
  • 9
-1
votes
1 answer

Weights and Percentages

I need to be able to edit weights values which are integers types by percentages. For example: I got the following weights: Var Weight x 100 y 50 z 50 So z is 25% ,y is 25% and x is 50% Now if I want to be able to edit an…
Tomer Peled
  • 3,571
  • 5
  • 35
  • 57
-1
votes
1 answer

Given a random number generator, using it to make a new one

Given a function F that generates random numbers between 1 and 5, how would I write a function G, using F, to generate random numbers between 1 and 7? The probability of each number generated by G should be the same. So far, I have tried the…
Lav
  • 1,283
  • 5
  • 21
  • 48
-1
votes
1 answer

Super Queen Puzzle array exception

I'm trying to implement the N*N queen algorithm with a little twist to it. In this version the queen can also move like a Knight can in chess. Checking for the diagonals and rows seems to be fine, however when I try to check for a queen in the "L"…
user1665569
  • 191
  • 4
  • 8
  • 17
-1
votes
1 answer

Issue with a puzzle solution in C language (CodeChef.com)

i've made my code to solve a puzzle at http://www.codechef.com/problems/FCTRL According to what i've tested, the program works right for any string of number. Apparently, the CodeChef website reports a wrong output. Can anyone correct me on this?…
rajagrawal
  • 622
  • 4
  • 14
  • 26
-1
votes
3 answers

Exception in thread "main" java.lang.NullPointerException (15-Puzzle)

First of all, this question is about 15-Puzzle. And I'm trying to learning how to code it in Java language. I have to study Artificial Intelligence at my College about IDA* algorithm, and found this link by Brian Borowski:…
yudayyy
  • 260
  • 2
  • 9
  • 20
-2
votes
1 answer

Hidden message in a picture

I'd like to read a hidden message in the following picture: The message is supposed to look like CTF{Something}. I've tried to find out how to read it for hours without success. So far, I've tried to read the RGB values of each cell. For instance,…
Manitoba
  • 8,522
  • 11
  • 60
  • 122
-2
votes
1 answer

How do I get a winning picture in a slide puzzle?

I make a slide puzzle game. When the puzzle is solved "won" should be displayed and the timer should stop. I hope you can help me. Thanks. Here is a link to the web editor for my puzzle link Here is the part of the code but it doesn´t work: function…
-2
votes
2 answers

Java Puzzle Solving Algorithm

I need help with writing code that can take an integer and up to 50 grids as input and calculate the minimum number of clicks needed (from an all white starting position) to achieve the grid(s) that was input from a user. I'm trying to write an…
Robin.G
  • 11
  • 5