Skip to main content

All Questions

Filter by
Sorted by
Tagged with
6 votes
2 answers
429 views

(Codewars) Goldbach's Conjecture (by @rsalgado) in Ruby

Link to kata: linkRank: 6 kyuKata author: @rsalgado I have been recently learning Ruby-lang and have been attempting to solve the following kata from Codewars involving Goldbach's Conjecture: ...
CrSb0001's user avatar
  • 619
3 votes
2 answers
146 views

Pattern Finding In Lists of Strings (2d Char Array), Advent of Code Day 04 Solution

This is part 2 of Day 4 of 2024's AoC: The problem is as follows: It's an X-MAS puzzle in which you're supposed to find two MAS in the shape of an X. One way to achieve that is like this: ...
Lozminda's user avatar
  • 143
3 votes
1 answer
257 views

Roman Numerals Look and Say in rust (BIO 2020 Q1)

I was practicing question 1a of the British Informatics Olympiad 2020 past paper. The Roman look-and-say description of a string (of Is, Vs, Xs, Ls, Cs, Ds and Ms) is made by taking each block of ...
sbottingota's user avatar
  • 1,153
6 votes
1 answer
438 views

FORTRAN90 test suite for Project Euler

The intent of this test file is to go through each of my Project Euler solutions and see if they: return the correct answer, and do so in under 60 seconds (unless expected otherwise). I am using ...
Olivia A's user avatar
5 votes
1 answer
87 views

Parsing Lists: BIO 2024 Q2

I was practising question 2a of the British Informatics Olympiad 2024 past paper. In this task you will manipulate lists of integers to create new lists. There are three fundamental lists that you ...
sbottingota's user avatar
  • 1,153
4 votes
2 answers
377 views

BIO 2021 Q3a: Window Dressing (BFS in C++)

I was practicing question 3a of the British Informatics Olympiad 2021 past paper. A shop is looking to display some boxes (conveniently labelled A, B, …) in their window. There is a desired order for ...
sbottingota's user avatar
  • 1,153
4 votes
1 answer
138 views

BIO 2021 Q1a: Down Pat

I was practicing question 1a of the British Informatics Olympiad 2021 past paper. A pat is a single letter or a string of letters which can be split into a left and right string (of at least 1 letter)...
sbottingota's user avatar
  • 1,153
1 vote
2 answers
109 views

Advent of Code 2023 day 1: Trebuchet (Part 2)

Task: The task involves analyzing a calibration document containing lines of text. Each line represents a calibration value that needs to be recovered by extracting the first and last digits (which ...
Madagascar's user avatar
  • 10.1k
4 votes
3 answers
1k views

Advent of Code 2023 day 1: Trebuchet (Part 1)

Task: The task involves analyzing a calibration document containing lines of text. Each line represents a calibration value that needs to be recovered by extracting the first and last digits and ...
Madagascar's user avatar
  • 10.1k
6 votes
2 answers
723 views

Making a Rock Paper Scissors game in Python - How to reduce repetition and make it more effective?

I am a "new" coder to Python - saying this because I got stuck in the tutorial hell - and I saw that doing projects was a way of consolidating what I had learnt from those tutorials, so here ...
Aldis Nuts's user avatar
2 votes
3 answers
757 views

Find median value of two Sorted Arrays

To improve my coding knowledge can you please give me suggested changes on my code? ...
Subha Rajagopal's user avatar
2 votes
1 answer
115 views

Codeforces: Dasha & Nightmares

so I got started with competitive programming about a day ago and I got stuck on the first random question I tried on codeforces. It's called Dasha and Nightmares. Problem Description: The problem ...
st0n3r's user avatar
  • 73
2 votes
1 answer
102 views

Project Euler Problem 1: Multiples of 3 or 5

The following is my solution to Project Euler Problem 1: Multiples of 3 or 5. ...
hexpev's user avatar
  • 23
1 vote
1 answer
173 views

Determine the chance a streak of 6 HEADs or 6 TAILS appear in 100 flips, repeated 10000 times [closed]

Here's the problem from the book Automate the boring stuff: write a program to find out how often a streak of six heads or a streak of six tails comes up in a randomly generated list of heads and ...
Nova's user avatar
  • 113
4 votes
3 answers
153 views

Simple photomosaic generator

I wrote an implementation of Robert Heaton's Programming Exercise for Advanced Beginners #4 (photomosaics) in C99 using the MagickCore library. The full code is as follows: ...
Wilson's user avatar
  • 43

15 30 50 per page
1
2 3 4 5
29