Questions tagged [puzzle]
DO NOT USE - prefer constructive questions, or use more descriptive tags. Otherwise, your question might be appropriate for codegolf.stackexchange.com.
838
questions
-1
votes
0
answers
24
views
Dose any know how to build a pipeline to OBS or SteamLab to stream to a custom HTML webpage
What i'm trying to do is get OBS or SteamLab to stream to my webpage. I'm using Google Docs, as it works like a 24hr HTML server. Basically the idea is a pipe line to OBS to my webpage to stream ...
-1
votes
2
answers
46
views
What's wrong with my semi complete Sudoku solver?
I'm trying to practice algorithm questions and I'm currently attempting a sudoku solver, please bare in mind that it isn't currently finished! I haven't added backtracking when there is more than one ...
-2
votes
1
answer
40
views
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
...
1
vote
1
answer
72
views
Turtle crossing its own path puzzle / algorithm
Looking for a little help to solve this problem below.
I have solved it by storing all coordinates for each move however I don't think that meets the time & space complexity requirements.
Also it ...
0
votes
0
answers
35
views
CarTalk Puzzler on perfect square dance
I'm trying to solve this problem here:
https://codingbat.com/prob/p287814?parent=/home/peter@norvig.com
This is CarTalk Puzzler #201028: RAY: This was from my ballroom dancing series and it was sent ...
1
vote
0
answers
48
views
I wanted to make a game where I cut a picture in 9 parts in Google Colab and then Jumbled them. The user would then assemble them in perfect sequence
The error which I am facing is that When the user gives the wrong input, it is taking so much time to load. I mean I haven't even seen the next line load till now. So I was asking how to solve this ...
0
votes
0
answers
101
views
Tower of Hanoi using Scala Pure function
I am new to functional Programming and I'm trying to implement scala Iterative way of implementing tower of Hanoi. I could solve it using the recursion way but I have difficulty trying to implement ...
2
votes
1
answer
122
views
How to tell how many times a number has been multiplied by an other number
I am trying to multiply a number a with b until it reaches a number given c, and store into a variable how many times it has been multiplied
let's say
a = 1000 b = 0.75 c = 500
I need to multiply ...
0
votes
0
answers
55
views
Solve Sudoko in Java
I've written the code as per the logic, but my Eclipse console is empty when I click 'Run'.
This is my code:
public class test {
public static void main(String[] args) {
int[][] board = new int[...
0
votes
1
answer
20
views
element swapping in a 4x4 array with numbers
I am making a game like this one : https://i.stack.imgur.com/mnbFw.jpg. I am having trouble coding the algorithm to swap numbers between each others. In my game , the 0 acts as the empty tile. This ...
0
votes
0
answers
99
views
what is the algorithm to turn white all cells in square with minimum clicks
This is a logic puzzle in which you have a square grid of 3×3 cells. Each cell is initially either white or black. When you click on a square it flips, or toggles, the color of that square and the ...
-1
votes
2
answers
57
views
I am trying to make "Game of Set" but don't know how to correctly check the set
Hi so I just started to learn coding and ruby is my first language. I am trying to make a game called "Game of Set" the rules can be checked in here or wikipedia
I am able to get users cards ...
-4
votes
1
answer
63
views
reduce javascript code (stack overflow 2022) [closed]
I'm doing this puzzle, and sometimes when I give a new game the pieces go wrong, I added a function for it and from what I see it doesn't work, my head can't take it anymore. And I would also like to ...
0
votes
0
answers
36
views
Is my algo. correct for solving minimum number of jumps in an array question?
Came across this question of minimum number of jumps to reach end of array :
https://practice.geeksforgeeks.org/problems/minimum-number-of-jumps-1587115620/1#
I designed a algo in O(n) here is the ...
1
vote
0
answers
36
views
how can I repleace two items from sortable puzzle box without pushing another pieces?
<script>
$(function () {
$("#box").sortable({
cursor: "grab",
});
});
Hi I`m building a simple puzzle with sortable ui for my kid. i already have box 4x4 ...
0
votes
0
answers
92
views
Python: Fit 2 puzzle tiles togheter to create one image
If have a project where I need to solve puzzles with tiles. I need to solve 2x2, 2x3, 3x3, 4x4 and 5x5 tile puzzles. And the difficult part is fitting 2 puzzles pieces togheter. I already managed to ...
0
votes
2
answers
66
views
A program that types out a board containing characters
I found a simple task on a programming discord channel and as a newbie I can not seem to solve it.
The program should use a subprogram that takes width, height, char_1 and char_2 as parameters and ...
0
votes
0
answers
25
views
Exit backtracking when finding a solution
So I need to solve a puzzle with constraints using backtracking and recursion.
I wrote the main function that solves the puzzle, but I have a problem.
When I find a solution I need to immediately exit ...
1
vote
1
answer
37
views
Logic Error in Chessboard Virus Simulation
The Chessboard virus problem is similar to Conway's "Game of Life". The rule is that any two squares with infected neighbours will become infected.
I have tried to implement the simulation ...
0
votes
0
answers
36
views
How to divide canvas and make each piece a different "field" in JavaScript?
I want to make puzzles in JavaScript and what I need is make canvas on the right side divided into 16 pieces separated by lines and make each piece a "field", so I can drag and drop image ...
0
votes
0
answers
430
views
How to Decrypt Clock Time values into Text using Clock Cipher?
I have been trying to decode and crack some clock times I have been received into there related letters to get the meaning in (text) , I Researched and I used (clock cipher ) online encrypter but I ...
2
votes
1
answer
754
views
Building a wordsearch generator in python
I am creating a word search generator in Python, but i'm having a problem with the words appearing the grid. When the grid is made, the coordinates are there for one of the letters but not the whole ...
0
votes
0
answers
154
views
How to create Shapes or Alphabets by joining dots ?( Join Dots for creating shapes puzzle) in Flutter
I want an App for creating shapes by Joining dots.
How to create Shapes or Alphabets by joining dots ?( Join Dots for creating shapes
puzzle) in Flutter?
Sample Image
1
vote
1
answer
594
views
A* algorithm TypeError: cannot unpack non-iterable int object
This is the python code which uses A* algorithm for finding solution for 8 puzzle problems, I got some error messages, how can I fix it?(The error message is under the code)
There are several object-...
0
votes
0
answers
74
views
Please help me understand the output of this python code [duplicate]
This is the python code I was trying out
a=[100,203,56,[18]]
b=list(a)
a[3][0]=89
a[1]=23
print(b)
and I got the following output:
[100, 203, 56, [89]]
I am not understanding why only one assignment ...
-1
votes
1
answer
120
views
Tosca puzzle 41040 solved with RBFW: can't click the button
very stuck in this puzzle:
The source page is: https://obstaclecourse.tricentis.com/Obstacles/41040
what I tried so far is:
*** Settings ***
Library Browser
#Library String
# title = CLICK ME IF ...
1
vote
0
answers
46
views
Does this strict weak ordering have a name (spoilers for a specific coding puzzle)
There is a coding puzzle I have encountered on one of those sites (I don't recall if it was leetcode or something else) which goes as follows: Given a list of strings, return the lexicographically ...
2
votes
0
answers
48
views
Tosca puzzle 81121 solved with RBFW (again and again)
This range/series is about test automation. The show the CEO's and managers of this world (in a later moment when all work is done) what exactly the difference is between Tosca and f.e. RobotFrameWork....
1
vote
0
answers
46
views
Tosca puzzle 23292 solved with RBFW
In Tosca puzzle 23292, but solving with RobotFrameWork...
I tried a Xpath on an element which in Xpath tester results in 1 location.
however in the actual VisualStudioCode result it gives an error ...
2
votes
1
answer
112
views
Tosca puzzle 73589 solved with RBFW. (failed: SyntaxError: EOL while scanning string literal (<string>)
In order to help te test community understand the differences in test tools, I try to make a range just like Flur-Funk did with Tosca.
(I used Tosca for a x time in projects)
So now I solve the same ...
3
votes
1
answer
350
views
How to solve partial Knight's Tour with special constraints
Knight's tour problem described in the image here, with diagram.
A knight was initially located in a square labeled 1. It then proceeded to make a
series of moves, never re-visiting a square, and ...
0
votes
1
answer
111
views
How to find minimum L such that k given segments with length L could cover n given points?
There are n points on the x-axis, each with an integer coordinate in the range [0, n^3
]. We can cover these points with k segments, each of length L (a segment can cover all the points within it, ...
-10
votes
3
answers
137
views
How can I replace this code with one if statement? [closed]
For the sake of challenge, how can I replace this code with only one if statement?
unsigned int x, y;
cin>>x;
if((x>=0)&&(x<=1)) y = 1;
else if (x<=3) y = 2;
else if(x<=5)...
-1
votes
1
answer
70
views
Pathfinder for a puzzle game
I want to develop a game like this one : https://gamesge.com/fr/fill-one-line-puzzle-game/
Starting with an empty grid I have to create a pathfinder to fill the grid with one line.
I only heard of A* ...
0
votes
1
answer
199
views
c++ Puzzle like tetris algorithm for random pieces
So there's a mini-game on which I try to find a solving solution given the following description:
You have a board 6x4 on which you are given random "tetris" pieces to put on to fill the ...
0
votes
2
answers
117
views
Solving a travelling salesman problem to maximize gain in minimum time
Team
I need suggestions on how to solve the below problem.
There are n places (for example say 10 places). Time taken from any one place to the other is known. On reaching a particular place a known ...
0
votes
2
answers
235
views
How to solve for unknowns in a 5x5 matrix in python
Here is a 5x5 matrix, with all cells unknown, it looks something like this:
A1+B1+C1+D1+E1| 1
A2+B2+C2+D2+E2| 0
A3+B3+C3+D3+E3| 1
A4+B4+C4+D4+E4| 3
A5+B5+C5+D5+E5| 2
_______________
2 1 2 1 1
So, ...
-2
votes
2
answers
366
views
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 ...
0
votes
1
answer
85
views
How to join matrices like puzzle pieces in python
I've got three puzzle pieces defined as a number of arrays, 7x7, in a following manner:
R3LRU = pd.DataFrame([
[1, 1, 1, 1, 1, 1, 1],
[1, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 1],
[1, ...
-1
votes
2
answers
1k
views
Solving a Chain Link Python Puzzle:
I am not sure where to start with the following python puzzle.
"You are holding a link of a chain. Implement a method longerSide to find which side of the chain has more links, relative to the ...
0
votes
3
answers
224
views
We need to provide rank. Logic is whenever we have a value 'Product' then we must start the new number & all other below should follow the same rank
Sample Input:
ID
Vals
1
Product
2
Milk
3
Butter
4
Cheese
5
Yogurt
6
Product
7
Muesli
8
Porridge
9
Product
10
Banana
Sample Output:
ID
Vals
RANK
1
Product
1
2
Milk
1
3
Butter
1
4
...
0
votes
0
answers
49
views
Recursive Sudoku Puzzle Solver Bug
I am writing a Sudoku puzzle solver that takes a list of lists as a "puzzle", with each list representing a row in the puzzle. I create a script with several functions to handle the puzzle, ...
-1
votes
3
answers
115
views
A little double-linked list puzzle
Disclaimer
So initially when I posted this, it was a forward list by my error even though I meant to do it as a double-linked list - that's why there are some replies that don't match the problem.
...
-1
votes
1
answer
84
views
when solving an 8 puzzle with a Manhatten distance heuristic there are no positions to move to even when the puzzle isnt solved [closed]
When solving an 8 puzzle with a Manhatten distance heuristic I end up running into a state where there are no positions to move to because I have a list that contains all the previously visited nodes ...
1
vote
0
answers
80
views
N Puzzle with Depth First Search
I'm trying solve N Puzzle with Depth First Search using python 3.
With 3 x 3 puzzle it run good and fast but with 4 x 4 puzzle, it runs too slow and can't find solution with error: "MemoryError&...
-2
votes
1
answer
356
views
Getting OUTPUT LIMIT EXCEED in C++ Program
I'm solving the Weird Algorithm problem:
Consider an algorithm that takes as input a positive integer n. If n
is even, the algorithm divides it by two, and if n is odd, the
algorithm multiplies it by ...
0
votes
1
answer
51
views
Data function not working react native firestore
I got stuck in this puzzle which doesn't seem to wanna be solved, I am kinda sure I am forgetting something since I just started learning react-native.
I have this code :
async componentDidMount() ...
0
votes
1
answer
19
views
making a list from the users answer
I am working on a project where I have to generate a puzzle based on the users input. I would ask the user how many words they will want to include in the puzzle and will also ask for the word. ...
0
votes
1
answer
94
views
sort words in descending order in a text file
Im trying to work on a project that generates a crossword puzzle. Its my first time taking/ learning python. So basically I want to first sort the words by length and then take the first word and ...
0
votes
1
answer
299
views
Sudoku Code Program - Checking Rows,Columns, and Boxes
I need help checking rows, columns, and boxes for a Sudoku program. I am a high school student that needs help completing this project. If any one could provide help that would be awesome! I am ...