794 questions
0 votes
2 answers
227 views
Printing a star shape using loops in python
I was trying to write a python code that would print a star shape using loops but I just can't get the shape right. Please suggest some corrections. This is my terminal: This is my code: for i in ...
1 vote
5 answers
428 views
Constraints for Hitori puzzle
The Hitori puzzle consists of an nxn grid filled with numbers 1..n, some of them repeated in rows and/or columns. The goal is to cover some of the repeated numbers so that i) there are no repeated ...
4 votes
1 answer
114 views
Why do the Tower of Hanoi roles change without any visible moves?
While working on the Tower of Hanoi puzzle, I noticed that sometimes the roles of the towers (source, destination, and auxiliary) change, but no disks are moved or printed. At first, I thought these ...
0 votes
0 answers
53 views
Optimizing backtracking algorithm for non-jigsaw puzzle
As my previous post outlined, I am making a puzzle solver, however, my puzzles don't contain jigsaw pieces but normal rectangles instead. My initial post was asking about an algorithm that I can use ...
5 votes
1 answer
276 views
Puzzle solving algorithm (not a jigsaw puzzle)
I have spent the past week coding an app that should take an image, which is divided into x rows and y cols, shuffled around, and put it back into its original state without any info about the ...
0 votes
0 answers
79 views
Backtracking not working on a Hitori matrix
It seems the code I wrote doesn't backtrack properly and i have no idea where the backtracking goes wrong. Hitori is an "reverse" Sudoku. You are given a matrix filled with numbers and have ...
2 votes
1 answer
74 views
algorithm for making sure everyone is in the same group
a group of x people where you have to choose 2 people at least 1 person is guaranteed to be selected to be in your group, is it possible to make sure everyone is in the same group try to sort people ...
0 votes
2 answers
143 views
generating solvable puzzles for a Double-Choco puzzle game. efficient data structure and algorithm to be used in?
I'm working on implementing a puzzle board game called Double-Choco published by Nikoli magazine Where the board is a 2-dimensional matrix with cells that are either white or gray. The goal is to ...
0 votes
0 answers
34 views
Finding the number of moves of 8-puzzle [duplicate]
Is there any algorithm to find, number of moves required to solve 8-puzzle, or find the complexity of 8-puzzle? I tried to check number of inversions in a problem, but it does not imply its ...
1 vote
1 answer
115 views
How to find the output when using an extremely large input in this algorithm?
During an interview I was given the following problem: From the following puzzle, what would the output of puzzle(power(2022, 100)) be? function puzzle(N) { A, B, C, D = 1, 1, 1, 1 .repeat N ...
2 votes
1 answer
168 views
Jigsaw Puzzle mechanism
Could anyone teach me how to make a jigsaw in unity with a mechanic like this https://m.youtube.com/watch?t=9&v=A957VVS299o&feature=youtu.be I know how to drag and drop but with that weird ...
-1 votes
2 answers
361 views
How to get customized bytes from /dev/urandom?
I am working on a program that finds partial collision in Bitcoin addresses. I have obtained source code for urandom and don't see where to start. So I want to get random bytes from /dev/urandom of ...
-2 votes
1 answer
2k views
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 ...
0 votes
1 answer
127 views
My sudoku solver solves the puzzles but contains some zeros
If someone can test this and find the problem that would be very helpful. The algorithm solves the puzzles but has some zeros in the solution which is not valid sudoku. I think the problem is if the ...
0 votes
1 answer
900 views
How can I cut an image into several pieces ? (REACT NATIVE)
I wanna make a puzzle and I need to cut an image. I use expo workflow. Is there any library for cut or divide an image?