# Questions tagged [computer-science]

A puzzle related to the main concepts of computer science, like algorithmics or information theory.

53 questions
Filter by
Sorted by
Tagged with
296 views

### Rotating numbers in a 3x3 grid

We have a 3x3 grid numbers like so 9 8 7 6 5 4 3 2 1 Four numbers in any 2x2 sub-grid can be rotated clockwise or anti-clockwise. For example a b c d rotated clockwise becomes c a d b Is it ...
444 views

### Move all the stones into a single cell of a 3x4 grid

A 3x4 grid contains a heavy stone in each cell. Walking from a cell to an adjacent cell (horizontally or vertically) without any stones requires 1 second. Moving one stone from a cell to an adjacent ...
262 views

### Heavy-duty computing challenge — maximum-density word packing

Caution: This is a challenge for computers only. Humans are advised to stand well clear of the protective safety cage. There may be CPUs on fire before it's over. Introduction Nothing makes a ...
144 views

### Beg for square brackets!

If you like snakes, beg for square brackets. If you are a black key, beg from "in". If you are another black key, beg for curly brackets. If you are fully functional, beg square ...
618 views

### Either You Or It

On the left, I am "you". On the right, I am "it". On the forward, I am either "you" or "it". What am I? Subtle hint: Moderate hint: Decisive hint:
200 views

### At The Square Brackets

The sky is so clear As if I am in emptiness. "Insert coin here" Says the arcade just emplaced. I will bring my eraser If my paper is swapped with a scrap. Nothing to extract from the scrap ...
51 views

### lightest ball among 8 balls by 2 tries using a balance scales [duplicate]

I have 8 balls and one of them is lighter than others. How could I find that ball by 2 tries? Also I have a balance scales.
170 views

### Hunting for treasure in 1-d grid [duplicate]

In a castle, there are N rooms in a line. Each room has a door to the two neighbouring rooms (or the one neighbouring room, for the rooms at either end). A treasure is hidden in one of the rooms. ...
321 views

### I need help to solve this puzzle

This puzzle was shared by a friend, who in turn got it from school, and there is no competition involved. We have been working on it for a long time without any answers at all. Can anyone help me find ...
153 views

Cyrus walked through the third door and went into a damp passageway. Suddenly, Cyrus found a big bug on the floor. "Damn!" Cyrus stepped on it and the bug died. After a while, Cyrus arrived at a small ...
306 views

### By American Standards

I once went to the USA and a guy asked me, "What is a+B?" I could answer him. What was my answer? HINT: Note: The title is appropriate, and B is capitalized on purpose.
2k views

### A strange computer programming language

Here is a list of rational numbers: $\frac{22}{21}, \frac{7}{11}, \frac{13}{7}, \frac{51}{65}, \frac{13}{17}, \frac{1}{13}, \frac{15}{2}, \frac{7}{1}$ This list is actually a computer program! It ...
124 views

### printf() does not support the %f format [closed]

The printf() function on your platform does not support the %f formatter.
206 views

### What is “God's Number” for Specific CFOP Algorithms on the 3X3 Rubik's Cube?

CFOP: What is God's Number for PLL and OLL Algorithms? I have been "speedcubing" on and off for 5-6 years now using CFOP and throughout my experience have come across many different algorithms for ...
103 views

### Deciphering Old Runes (or: What's The Program?)

Some background: I was going through some old photos of mine, and I came across old doodles I had made during algorithms class (while getting my bachelor's in computer science). I remember these ...
208 views

### Critters Ate My Clue

I recently visited a rummage sale at my local community college, which was trying to get rid of a ton of old and outdated equipment in storage to make way for a new Makerspace. As I browsed through ...
179 views

### Are they buffalos? No, they're something slightly different [closed]

Given the numeric sequence: 344865 78930 136275 152340 Is the next number in the sequence: a) 82770 b) 340545 c) 271125 d) 75060 The title is, as always, a hint. Here's another: EDIT: Changed ...
716 views

### You are almost there

I am, in a way, half of eight but not four - not that straight. I am, in a way, half of infinite my location is always definite. I can mean not only not positive for a logician but also almost or ...
860 views

### How to test for logic operator precedence

While coding in Python, I realized I couldn't remember which is evaluated first: and (the logical conjunctive operator), or (...
2k views

### Riddle: In an improved ocean

In an improved ocean, its results are faster and bigger than the results of changeling courses. In coffee, it is actually nondescript, and after proofreading, it pretty much amounts to destroying and ...
882 views

### IBM Research Puzzle – 5-ops implementation of erasure code

I found this interesting puzzle on IBM Research Puzzling Page called Ponder This; specifically, here. Design a storage system that encodes 24 information bits on 8 disks of 4 bits each, such that: ...
379 views

### Logical descriptions of logic puzzles

What notations are there to describe a logic puzzle format? Here, I'm talking about logic puzzles like Sudoku, Bridges, Kakuro, Tents; games with exact rules and an exact & finite number of ...
2k views

### Color this map using only 4 colors (easy)

According to graph theory, in order to color any map so that 2 touching regions don't have the same color, 4 distinct colors are enough. Can somebody color the following map?
346 views

### Find the Cell Number, free the Mayor

Last night, the mayor of a small town was kidnapped. 2000 suspects have been brought into the local prison based off eyewitness reports as to what the suspect looked like.One of these 2000 suspects is ...
281 views

### Sorting a single number

What is the only number that, when written in English, gives a sequence of letters which is sorted alphabetically? (The original phrasing of the question was meant to be a bit less straightforward to ...
894 views

### The confusing cat [closed]

I have a cat. The cat found a mouse. The mouse fled and found a keyboard. The keyboard was pressed by me and on the monitor appeared a 5-letter word with the 1st and 4th letters the same. Then the cat ...
816 views

### A deciphering riddle

Recently in class a computer science related deciphering riddle was shown which I could not solve. For the course itself it is not obligatory to solve it but I am interested in the topic and I wonder ...
343 views

### Little Red Solving Hood goes one-stop swapping

Moral of the story:   Two stored values may be swapped arithmetically with 4 or fewer variable references. Puzzle of the story:   Can you exemplify the moral?   (With 10 or ...
379 views

### Can you help me with my homework?

My teacher set me some homework: What is the answer to my homework? You will also need a copy of my homework to help you. You don't need the image to solve the puzzle, that is just a preview. Hint:...
1k views

### The Computer Science Department

On a tour of a nearby university, we went into the computer science department. I was fascinated by the courses they offered, of course, but there were weird grids displayed on screens along the ...
384 views

### Chain Of Computer/Code Puzzles

I will not be tagging this puzzle, purely because I don't want to give away exactly what is in it, but I will give you an "abstract" for it. (except for the one "computer-science" tag because I need ...
762 views

### Encrypted Coordinates

I have a set of what I believe to be 4 (X,Y) points turned into a blob of hex like so: 0x000080BFA8AAF340000080BF031AFE40FFFF3F41010D6741FFFF3F4153D56141 Can you ...
883 views

### How many bits in the Apple Logo? [closed]

Sorry in advance if this is a bit easy or if it breaks any rules, but it's the best I can think of. The Question: If there are 16 bits in a picture of an apple, how many bits in the Apple Logo?
289 views

### What is my colleague researching?

This past Saturday, I spent the evening at a small party hosted by my colleague, Dr. Macdonald, at his new pastoral home, about an hour outside the city. During the course of the evening, obviously ...
455 views

### Guessing is a four-letter word

This is my first riddle here — I hope it's not too easy. I killed my brother a long time ago, And if I'm right, running fast won't help you. My relatives are weaker, shorter; But I ...
251 views

### Second Gym: Misty! Who's this Pokemon?

This question is the second one in a series of Poke-related questions I hope that I can ask. Who's this Pokemon that: Is is in the first N pokemon, where N is a number most closely to a power-of-two....
95 views

### I am what a kernel runs in — What am I [closed]

I am what a kernel runs in. I block the kernel from accessing the screen. You must make a driver in another one of me to use the screen. My name is found in Windows, Apples too. Spoiler:
424 views

### A Maze of Characters

I have a maze here with me. However, this maze is quite hard to see. w Q q # 2 ñ ÿ The bottom of the list of characters is the start of the maze. The top is the ...
2k views

### Good Apple Hunting

The boys brought him in for questioning, but I didn't think he had anything to do with this. Not really. I just had to know if he knew anything pertinent about that strange passage in the old man's ...
551 views

### Does this need to be fixed?

I found this device the other day - it seems like a calculator, but the results it's giving me don't make any sense. Here, if I try this... $6 + 3 = 38$ See! It doesn't make any sense at all. Should ...
365 views

### Time to unlearn. What's this movie quote?

This Java snippet describes a quote from a movie. Can you find the quote? void function (int number, int attempts) { { if (number > 1) { do { System.out.println('something'); ...
1k views

### A Strange Planet with a Strange Dance

You're a cosmonaut dedicated to exploring and understanding strange new worlds. The latest world you've arrived on has a species with a very strange mating dance. After careful observation, you ...
267 views

### Placing markers in grid and minimize similarity of rows

Imagine a game on a grid of $m$ rows and $n$ columns. Player One will place a fixed number $r$ of markers in each row. Player Two will select the two rows which maximize the number of columns having ...
952 views

### Slumdog millionaire (9)

My Indian friend Jamal recently participated in the well-known TV quiz show Who wants to be a millionaire?. You might have heard or read about Jamal's spectacular success; the media reported on it ...
656 views

### Exponential time in a Blue Eyes variant

I created a variant of the Blue Eyes problem where the logic took 4901 days (over 13 years) to totally play out. I thought this was nice, but I was hoping for an even longer period of time. Of ...
17k views

### XOR - Is it possible to get a, b, c from a⊕b, b⊕c, a⊕c?

Just got a simple question from a friend; still thinking. Let's share it! Is it possible to get a, b, c when you have a⊕b, b⊕c, a⊕c ? where ⊕ is the boolean ...
606 views

### Two lists of favorite words 2!

This is inspired from Luke's Two lists of favorite words. My aunt Sally keeps this list of her favorite words tacked on the refrigerator: Angel Art Atlas Bad Detail Hall Hand Mutter Rat Tiger ...
548 views

### Generalisation of Nim

I'm asking for a general formula/algorithm that can be used in such a game. There are $n$ piles, with varying number of pebbles. The number of pebbles in each pile is given by an array from \$pile[...