instruction_seed
stringlengths
29
40.5k
source
stringclasses
6 values
You are provided with a collection of strings, and your task is to create a singular composite array that encompasses all of these strings, ensuring that the original array of strings can be meticulously reconstructed from the resulting larger array. The strings may encompass any valid ASCII character. What methodology...
evolcodegolf
Isn't it frustrating when you're engaged in computational tasks involving floating point numbers, yet your implementation fails due to two values being unequal at the least significant bit level? Now you have the opportunity to rectify that issue! Construct a function that accepts two floating point numbers formatted...
evolcodegolf
Design a program that generates and displays all whole numbers inclusively within an interval (a, b), while substituting any multiples of 8 in the series with randomly selected, uniformly distributed, non-numeric, non-whitespace, printable ASCII characters, ensuring that each replacement accurately reflects the digit c...
evolcodegolf
Consider a 2-bit bitmap of arbitrary side-lengths overlaid on a coordinate grid and imaged with random data (1's represent an element of the image, 0's represent the "blank" canvas background): y x—0 2 4 6 8 10 14 18 | 0 0000000000111100000000 0000000011111110000000 2 0000111111111111000000 00000111111...
evolcodegolf
Introduction Given a specified positive rational number r, your task is to determine a pair of integers p and q such that p/q=r, while simultaneously minimizing the occurrence of the least frequently used bits in both p and q (as detailed below). Challenge A positive rational number r can be expressed as the rat...
evolcodegolf
Input A list of tuples, where each tuple contains a string and an integer. Output The 'grouped' result of this list. How to create a grouped result A grouped result is a dictionary where the keys are the unique strings from the input tuples, and the values are arrays containing the integers associated with ea...
evolcodegolf
Your program is required to accept a positive integer n that exceeds zero and subsequently produce a visual representation in the form of a bar constructed from n // 8 ▉ characters (U+2588). Additionally, it must conclude with a final character that falls within the range of ▉ ▊ ▋ ▌ ▍ ▎▏ (U+2589 to U+258F), which shoul...
evolcodegolf
Craft a sophisticated ASCII-art calendar that visually represents a set of scheduled activities along with their respective starting times and dates. Each activity is assured to occur within the same month, and it is guaranteed that no two activities will coincide on a single day, ensuring that all activities seamlessl...
evolcodegolf
Examine the subsequent 3x3 configurations that the marching squares algorithm would delineate for each cell (with zero-based indexed identifiers): 0: ... ... ... 1: ... ... \.. 2: ... ... ../ 3: ... --- ... 4: ..\ ... ... 5: /.. ... ../ 6: .|. .|. .|. 7: /.. ... ... 8: /.. ... ... 9: .|. .|. .|. 10: ..\ ... \...
evolcodegolf
Challenge: Print the entire printable ASCII charset (not just a range!) in order while ensuring that the output is formatted in a way that aligns the characters in rows of ten. !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Rules: read closely No other characters allo...
evolcodegolf
Given a positive integer greater than zero, output the total of the concatenated digits from all integers (1 through n), but ensure the digits are also reversed and then summed. Furthermore, the output must be presented in a format that shows both the concatenated and reversed sequences separately, along with their res...
evolcodegolf
Your task is to engage in a computational process where, given two integers \$a\$ and \$b\$, you must determine the output \$\Pi[a,b]\$; specifically, this refers to calculating the product of all integers within the inclusive or exclusive range defined between \$a\$ and \$b\$. You are free to choose any appropriate me...
evolcodegolf
In the spirit of mathematical exploration, I present a new challenge that extends beyond the realms of previously known colossal numbers. Consider the "Stranski Number," which originates from a theoretical programming challenge involving an advanced computational process that iteratively applies a unique transformatio...
evolcodegolf
Consider a mathematical sequence known as the n-digit summing sequence (n-DSS), which initiates with the integer n. In this sequence, if the most recent term is denoted as k, the subsequent term is derived by adding the digit-sum of k to itself. The following enumerates the initial terms for several n-DSS: 1-DSS: 1, 2...
evolcodegolf
In this abstract challenge, we will explore the manipulation of stacks within a hypothetical card arrangement framework. Consider three integers \$0 \leq n, m < 10000, 0 < k < 10000\$. You have \$m + 3\$ columns, where \$m\$ columns are empty, and three contain cards (arranged from bottom to top) as follows: \$[0, -1...
evolcodegolf
A renowned architect is tasked with designing an art gallery to display controversial pieces that provoke strong reactions from visitors. Due to the unpredictable nature of the audience, if two visitors with opposing views on a piece of art are left alone in the same room, it could lead to heated arguments or even viol...
evolcodegolf
The challenge of navigating the obstacle course You find yourself ensnared in an intricate obstacle course, from which you must devise an escape strategy. However, if you fail to select the most efficient path promptly, the exit will seal shut before your attempt to flee. Your mission is to determine the most expedie...
evolcodegolf
Your undertaking, should you elect to embrace it, involves crafting an intricate code for a GPS receiver that integrates several nuanced functionalities. Input The current time, represented in nanoseconds since the Unix epoch. [EDIT: This is optional; please clarify your requirement for it.] Four satellite signals...
evolcodegolf
A number is designated as B-powersmooth if every prime power \$p^v\$ that divides the number adheres to the constraint of \$p^v \leq B\$. The concept of B-powersmoothness holds significant relevance in various computational algorithms, such as Pollard's p-1 factorization technique, which relies on understanding the smo...
evolcodegolf
In this intricate challenge, you are tasked with processing two distinct lists comprised exclusively of positive integers, subsequently utilizing the zipping function defined through the following recursive expression: \[ \mathrm{zip}(a,b) = \begin{cases} \left[\,\,\right] & a = \left[\,\,\right] \\ [a_0]\mid\mid\mat...
evolcodegolf
The Reuleaux triangle is an intriguing geometric figure created by the intersection of three circles, each centered at the others' centers. Notably, irrespective of its orientation, the width of a Reuleaux triangle consistently matches the radius of the circles: Image: Wolfram MathWorld Devise a concise program that...
evolcodegolf
Given a positive integer \$m\$, determine the total number of unique cyclic hydrocarbons with \$m\$ carbon atoms, disregarding geometrical isomers; or, alternatively, find the number of unlabeled graphs with \$m\$ vertices, where each vertex has a maximum degree of \$3\$. This corresponds to OEIS sequence A000602. Ex...
evolcodegolf
Select a renowned computer scientist or a trailblazer in the field of computer science, whose birth year is 1942 or earlier—considering that 1943 signifies the onset of the 'first' computer's development. Ensure that they have a dedicated Wikipedia page or another reputable source documenting their birth year and eluci...
evolcodegolf
Input 4 integers p, q, r, s from the range -999 to 999 inclusive where all values are non-zero integers. Output 4 integers e, f, g, h such that ep + fq + gr + hs = 1, ensuring that none of the integers are zero. Restrictions Your output should minimize the sum of the absolute values, achieving the smallest va...
evolcodegolf
Given a string and integer n, split the string at every nth character while ensuring that if the last segment is shorter than n, it remains as is, and print the result as follows: Ex) laptop 3 should print lap top laptop 2 should print la pt op (observe how it splits the string at every 2nd character) Special c...
evolcodegolf
Given the provided response from Arnauld, it appears that the complexity of this version does not significantly exceed that of its predecessor, which is why I made it an optional component of the additional challenge. The absolute value of a variable \$x\$ is customarily denoted as \$|x|\$. Since both the left and ri...
evolcodegolf
Given a collection of positive integers organized as follows, which we will conceptualize as a representation of a river: [6,1,9,3,7,4,6,3,2,7,6,6] Imagine we are tasked with the challenge of skipping a stone across this river. The stone can be thrown with varying force to land on different integers, each dictating t...
evolcodegolf
Design an intricate program that identifies whether a given ASCII string adheres to the criteria of being bit primed, meaning that bits located at prime indices must exhibit an alternating pattern between zero and one, commencing with one. The program should process strings of up to 1000 characters in length. For ref...
evolcodegolf
I present to you a stealthy mouse-tracking challenge. The program must operate seamlessly across Windows, Linux, or Mac OSX, and can be developed in any programming language. Upon launch, it should display the message: "Tracking your moves" (via console or graphical interface). The focus of this task is to monitor and...
evolcodegolf
Consider the following ternary matrix: $$\begin{matrix} 2 & 0 & 1 \\ 1 & 2 & 0 \\ 0 & 2 & 1 \end{matrix}$$ The (1-indexed) coordinates of the \$2\$s here are \$(1,1), (2,1), (2,2), (3,2)\$. We can also notice that there are two "shapes" of \$2\$s in the matrix, made of orthogonally connected \$2\$s: $$\begin{matrix} \c...
evolcodegolf
Input no input for this task The Challenge Write a code that outputs: The first 10 prime numbers where the product of their digits equals the number of letters in your code Examples Let's say your code is "HelloWorld" which contains 10 letters your code must output [13, 37, 73, 113, 127, 131, 151, 197, ...
evolcodegolf
You are provided with one-quarter of a map that exhibits symmetry over both the x- and y-axes as input. The program must accurately print the complete map while ensuring that the output adheres to a specified width and height, which should be larger than the dimensions of the input. The map may consist of the following...
evolcodegolf
In this intricate undertaking, we construct ASCII-based user interfaces with specified components and intricate alignment properties. +----------------------+ |+-----------++-------+| ||<- Previous||Next ->|| |+-----------++-------+| |== The title == | | | |Lorem ipsum dolor | |sit amet...
evolcodegolf
Input a positive integer \$k\$. Begin with \$n := 1\$ and increment \$n\$ iteratively by the largest integer power of ten \$i\$ such that \$i \le n\$ and \$i + n \le k\$. Continue this process until \$n = k\$ while also ensuring that the intermediate values of \$n\$ increase are exclusively derived from unique values o...
evolcodegolf
In this competition, you will engage in a bot battle where the goal is to determine which bot can outlast the others in terms of survival. Each bot possesses the unique ability to enhance its strength when attacked, thus careful deliberation is essential before deciding to launch an offensive strike. During each turn...
evolcodegolf
Challenge: Accept a string from the user, then calculate the total number of consonants, followed by displaying each consonant in ascending order without duplicates. The quickest solution takes the prize! Output must resemble this format: Enter String: Input Consonant Count: # Unique Consonants: C, D, F, G, H, ....
evolcodegolf
Input a non-empty collection of \$n\$ distinct positive integers. Assess whether the supplied collection comprises every integer within the range of \$1\cdots n\$. If you prefer to utilize a zero-based indexing system, feel free to input a collection of non-negative integers and verify if it encompasses every integer ...
evolcodegolf
Devise a function or program capable of accepting input through stdin or via command-line or function arguments, which shuffles characters within a provided string and subsequently outputs the resultant string through stdout. The initial input should consist of a non-empty, non-null string, succeeded by a space and an ...
evolcodegolf
The Problem: You receive a (section of) a Conway's Game of Life grid. Your task is to output whether it represents a still-life (subsequent generations are identical to the current grid), an oscillator of period up to 4 (every nth generation is identical to the current grid), or something else entirely, while also prov...
evolcodegolf
Target: Create a ceil() function from scratch. You can manipulate numbers through operations like multiplication and addition, and you can represent the number in binary or string format. All programming languages are acceptable. The use of any built-in functions (such as toInteger() or round()) or casting operators ...
evolcodegolf
Devise a program that accurately reads an input string and adeptly inserts commas to partition large numbers into groups of three digits, such that an input of 10000 yields an output of 10,000. Furthermore, the program should proficiently 'correct' improperly formatted numerical representations according to the criteri...
evolcodegolf
I encountered an intriguing gif depicting the twin dragon curve generated from a square, which sparked my curiosity about the outcomes if we initiated the process with an alternate base image. Consequently, I devised a program to explore this phenomenon further. Inspired by its fascinating visual appeal, I thought it...
evolcodegolf
On the evening of 31 January 2020, a historic event will transpire as Brexit culminates, resulting in the United Kingdom's departure from the European Union, marking the inaugural instance where the total count of EU member nations will decline. Your task entails extracting a date and determining the corresponding tall...
evolcodegolf
Engaging in the trade of domain names represents a significant opportunity within the digital economy. Central to effectively navigating this marketplace is the implementation of an automated appraisal tool, which facilitates the estimation of a given domain's monetary value with ease. However, it is important to note ...
evolcodegolf
In this question, a game was devised in which players would face each other off pair by pair in the Prisoner's Dilemma, to determine which iterative strategy scored the highest against others. In this question, I devised a way for multiple people to play the Prisoners' Dilemma against each other all at the same time. I...
evolcodegolf
Inspired by Braille graphics, your task is to construct an analog clock utilizing the terminal console to depict and animate the clock using UTF-8 fonts ranging from \U2800: ⠀ to \U28FF: ⣿. 00:[⠀] 01:[⠁] 02:[⠂] 03:[⠃] 04:[⠄] 05:[⠅] 06:[⠆] 07:[⠇] 08:[⠈] 09:[⠉] 0A:[⠊] 0B:[⠋] 0C:[⠌] 0D:[⠍] 0E:[⠎] 0F:[⠏] 10:[⠐] 11:[⠑] 12...
evolcodegolf
Devise a function (not an entire program) that, when invoked with a single global variable (or the closest equivalent in your programming language) as its argument, generates an output that is the name of that variable. In cases where the provided argument does not correspond to a variable, the function should yield a ...
evolcodegolf
A harmonious sequence is a series of positive integers in which the ratio of consecutive elements is either greater than or equal to 0.5 and less than or equal to 2. This means that each element must be at least half of its predecessor and no more than double it. For instance, the following sequence is harmonious: [1,...
evolcodegolf
Devise the most concise function capable of accepting a single string input, and subsequently generating a regular expression that matches any sequence of characters EXCEPT the provided string, encapsulating it within parentheses. Ensure to properly escape any requisite symbols in accordance with Perl's quotemeta funct...
evolcodegolf
Input: An integer Output: Calculate the sum which comprises the input integer itself added to the length of its string representation, and additionally, the aggregate of each of its individual digits. Thus, the expression can be summarized as: input_value + length_of_input + {sum_of_digits} = resulting_output Example...
evolcodegolf
A momentous event transpired with Brexit, and in a moment of clever marketing, Sky News chose to showcase a countdown displayed prominently on the side of a bus. Your task now is to conceive a digital countdown reflecting this momentous occasion. The UK's departure from the EU is officially set for 31st March 2019, an...
evolcodegolf
You are an employee at the trendy new grocery store known as Half Foods, and it happens to be the day before Thanksgiving Christmas Easter. Given that the store will be teeming with customers eagerly rushing to procure their essential food items, it is imperative for the establishment to have a traffic manager assigned...
evolcodegolf
You are tasked with developing a program that processes a list of strings as input. For each string within this list, you must ascertain the minimum N such that no other string in the list commences with the identical N characters as the current string under examination. Subsequently, construct a new list containing al...
evolcodegolf
With a significant occasion such as a friend's birthday approaching, particularly for one who has a penchant for programming and ASCII art, it would be quite thoughtful to craft an ASCII representation of a cake. However, I seem to repeatedly misremember his exact age. To address this issue, I require a program designe...
evolcodegolf
Construct an intricate regular expression that exhibits self-referential behavior by successfully matching its own structure. For instance, the pattern #.*$ captures comments positioned outside of string literals in Python, extending to the end of a line, while simultaneously aligning with its own definition in Perl's ...
evolcodegolf
Incorporating a black-and-white image provided in any commonly accepted lossless format as input, generate ASCII art that closely approximates the input image while maintaining significant fidelity. Rules Only linefeeds and ASCII bytes ranging from 32 to 127 may be utilized. The input image will undergo cropping to ...
evolcodegolf
This engaging challenge, inspired by a thought-provoking article on Daily WTF entitled You Can't Handle the True!, features a peculiarly crafted string comparison articulated as follows: String affirmation = "YES"; if ((delay.hashCode()) == affirmation.hashCode()) Consider the chaos that could have ensued for Steve's ...
evolcodegolf
Considering languages such as Brainfuck and JSFuck for their efficiency in character count, which programming languages would provide the highest information density per character? I have APL and J in mind, but I suspect there are additional candidates worth exploring. My objective in this inquiry is to identify a prog...
evolcodegolf
Craft a minimalistic program designed to eliminate all instances of partially matched duplicates from a specified list while exclusively preserving the longest entries. The sequence of the output is not of paramount importance. Given the inputs, the objective is to identify strings that feature the term "reminder" fo...
evolcodegolf
The task presents a straightforward yet intriguing challenge: given an input time represented as a string in one of the specified formats—hh, hh:mm, or hh:mm:ss, with the constraints being 0 ≤ hh ≤ 23, 0 ≤ mm ≤ 59, and 0 ≤ ss ≤ 59—your objective is to derive the current time and express it using the following designate...
evolcodegolf
Your objective involves the intricate translation of a 103-smooth integer into a corresponding English lexeme, employing the detailed methodology outlined below. How? 1. Generate an exhaustive list of prime factors (including multiplicity) for the specified integer. 2. Organize this list: - If 2 is absent from t...
evolcodegolf
Given a collection of strings, generate a single string that is constructed by extracting a character from each string at each corresponding position, subsequently sorting these characters by their ASCII ordinal values before appending them to form the final output string. To elaborate, for n input strings, the output ...
evolcodegolf
Compose a program that ingeniously generates mirror images of its own structure. As an illustration, consider the extraordinary camel code that reads its own source code, producing not one but two smaller 2x2 representations. Given the following input: $_='ev ...
evolcodegolf
Programming Puzzles & Code Golf has opened a taco truck! The word is out and now users from all over the Stack Exchange network are coming to try our tasty, authentic ASCII tacos. We need your assistance to ensure that everyone receives their orders in a timely manner. Given the limited space within food trucks, you'll...
evolcodegolf
Consider a positive integer \( n \) as input, and generate the comprehensive sample space representing all possible outcomes of \( n \) sequential flips of a balanced coin. The coin possesses two distinct faces, labeled as 'H' for heads and 'T' for tails, each occurring with an equal probability of 0.5. For illustrati...
evolcodegolf
In the realm of philosophical challenges, programmers have tackled the intricacies of the trolley problem, which traditionally involves a directed graph where each edge is weighted by the number of individuals situated on the track (edge). The primary aim in the conventional scenario is to devise a route through the gr...
evolcodegolf
Consider a partition as a sequence of integers arranged in non-increasing order, where each integer corresponds to a specific quantity of dots. Given a partition represented by \$n_1, n_2, \dots, n_k\$ such that \$n_1 \geq n_2 \geq \dots \geq n_{k-1} \geq n_k = n\$, we will visualize this by placing \$n_i\$ dots on the...
evolcodegolf
Consider these 15 ASCII playing card patterns (ace through Joker, including the back side), where X serves as a placeholder representing the respective suit symbol: (the visual representation improves with reduced line spacing) ------------- ------------- ------------- ------------- ------------- ----------...
evolcodegolf
Introduction Let a field be a rectangle filled with only the characters - and [0-9]. An example of a field is: 11-011123 111-010-- 0010---01 111-01234 You see that this field has been separated into three smaller areas: To calculate the score of a smaller area, we just add all numbers up. For example: ...
evolcodegolf
Note This is the encryption challenge. The decryption challenge can be found here. Challenge The challenge is to encrypt a given string while adhering to the specified rules outlined below, ensuring that the output must not only maintain the character count but also must produce a mirrored effect for every fourth...
evolcodegolf
The Challenge In this intricate task, given a numerical input n, your objective is to accurately produce the nth Fibonacci number. You are permitted to utilize either 0 or 1 indexing; however, it is imperative that you clearly indicate your choice in your submission. The straightforwardness of the task belies a uniqu...
evolcodegolf
Consider a standard 12-hour analog clock displaying a specific time t in hours and minutes, along with an offset o in minutes. Your task is to determine the time displayed on the clock after applying this offset to the original time t. Ensure that the calculation properly wraps around when moving past the 12-hour mar...
evolcodegolf
Background For those deeply engaged in code golfing, the intricacies of the bitwise XOR operation are likely familiar. This operation, when applied to two integers, yields another integer characterized by 1s in the binary positions where the two operands diverge. As an illustrative example, consider the binary expres...
evolcodegolf
In a world where digital clocks and smart devices govern our lives, time management is more critical than ever. But what if these devices could malfunction or, even worse, be tampered with? Imagine a scenario where time discrepancies occur not only due to faulty software but through deliberate manipulation of time itse...
evolcodegolf
A pangram is defined as a sentence or excerpt that incorporates all twenty-six letters of the alphabet, as illustrated in this code golf challenge. In contrast, a pangrammatic window refers to a substring that constitutes a pangram, which may start or end in the middle of a word, extracted from a more extensive text. T...
evolcodegolf
Develop a program that systematically eliminates any shared leading spaces present within an input string, thereby ensuring that if the line with the least indentation commences with a specific number of spaces—let’s say 3—then every other line that has 3 or more leading spaces should consequently have those 3 spaces s...
evolcodegolf
Determine the value of x for a given positive integer n, ensuring that x! equals n, where both x and n are strictly positive integers. It is guaranteed that n corresponds to the factorial of a positive integer, eliminating cases like n=23. Walk through the logical steps necessary to derive x from n. Examples: n=1 -> ...
evolcodegolf
In the realm of advanced number representation, consider a notation system called "dual radix notation." This system extends the concept of quote notation to accommodate two independent bases, each represented by a distinct "quote" and "point" character. A number in this notation is structured as a string comprising di...
evolcodegolf
You find yourself in an unusual city, on a quest to locate the legendary Nineteenth Bakery, renowned for its extraordinary selection of deleted posts. The arrangement of shops here is peculiar; each street features a variable number of shops, but their numbering is not sequential. Rather, each shop is labeled with a nu...
evolcodegolf
(Analyze the phonetic structure of a given Lojban-derived word.) Premise Lojban, a constructed language, has a unique phonetic system that influences the formation and pronunciation of its words. Each term embodies a combination of rules that dictate how sounds can be arranged, creating a distinct rhythmic and tonal...
evolcodegolf
I want to preface my inquiry by affirming that I have diligently ensured this question adheres to the relevant topic of discussion. Furthermore, I would like to explicitly clarify that this inquiry pertains to optimizing a specific snippet of code rather than presenting a problem to solve. Recently, I engaged with the...
evolcodegolf
In the charming village of Кодгольф, nestled in the remote reaches of the Russian far east, a pressing issue has arisen: the population stands at a mere 65 individuals, and an influx of newcomers has not
evolcodegolf
Construct a program or function that efficiently prints a representation of a cube (if such a classification is permissible) in various dimensions, while ensuring that the output aligns perfectly with the specified requirements: ^L^L^L^L^L^L^L^L^L^L^L //^L^L^L^L^L^L^L^L^L^L^L ////^L^L^L^L^L^...
evolcodegolf
Meta-background This inquiry emerged within the Puzzling community, quickly inciting reactions such as, "naturally, someone will simply automate the solution via software". A lively discourse ensued concerning the level of sophistication a computational program would require to tackle this problem effectively. The qu...
evolcodegolf
All-pairs shortest paths is a standard pathfinding problem. This is a twist on that. Definitions We are searching for paths on a directed graph. Graphs are defined by square matrices, for example 0 3 2.5 1 0 1 0 -1 0 Write M(r,c) = value in M at row r, column c is the cost to travel from node r to node...
evolcodegolf
Please be aware of the distinct scoring criteria associated with this particular challenge. Given a non-empty string composed solely of lowercase letters from a-z, produce the string that precedes it in the shortlex order. To clarify the concept of shortlex order: We create a sequence of strings by first cataloging...
evolcodegolf
With an added layer of complexity; your algorithm must maintain a complexity lower than O(X²), where X denotes the Nth prime number. Additionally, your solution post should meticulously detail the character count and provide a theoretical complexity analysis in terms of X (or N, which is approximately X/ln(X) and there...
evolcodegolf
In this mathematical endeavor, you will be provided with a square matrix A, a vector v, and a scalar λ. Your task will be to ascertain whether the pair (λ, v) constitutes an eigenpair pertaining to matrix A; that is, whether the matrix-vector multiplication Av yields the result of λv. Dot Product The dot product betwe...
evolcodegolf
When engaged in a game of Wordle, it's not uncommon to reach your fifth guess only to find yourself at an impasse, left scrambling mentally through a myriad of remaining letter combinations, both logical and absurd, as you strive to decipher the elusive final word. The objective at hand is to systematically generate an...
evolcodegolf
The objective of this intricate task is to generate an ASCII representation of the iconic cover of the critically acclaimed album by the legendary rock ensemble Pink Floyd. The junctions of the bricks are constructed using the characters _ and |. Each brick possesses a specified width of 7 and a height of 2 characters,...
evolcodegolf
Envision a quadrant of an unbounded chessboard, represented as a two-dimensional square grid, stretching infinitely in both the upward and rightward directions, revealing the lower left corner. In that corner, inscribe a 0. Subsequently, for each cell located at coordinates (x,y), populate it with the smallest non-nega...
evolcodegolf
Given some input array a = [a1, a2, ..., an] and a positive integer k, shuffle the input array a such that no entry is farther than k from its initial position, while ensuring that the final arrangement maintains an ascending order for every subset of three adjacent elements. Example: Given the array [1, 2, 3, 4, 5,...
evolcodegolf
In a world where the fabric of programming languages intertwines with artistic expression, imagine developing a tool that not only interprets code but also visualizes it in a dynamic shape that evolves with the complexity of the code itself. This tool will analyze a given source code string and generate a visual repres...
evolcodegolf
A function or program that accepts inputs and produces outputs can be characterized as having a cycle if invoking the function using its own output repeatedly ultimately returns to the original value. For example, consider the following function: Input: n 1 2 3 4 5 6 Output: f(n) 5 7 1 3 4 9 Starting with n=...
evolcodegolf
The Xerox Alto, which made its debut in 1973, holds the distinction of being the pioneer computer to incorporate the now-iconic angled mouse pointer. The representation of the Alto's bitmapped pointer is illustrated below (redrawn from Fig. 2 here): Your challenge in this code-golf task is to devise a program/function...
evolcodegolf
Introduction We all know and love our Fibonacci sequence and have seen a myriad of challenges on it here already. However, we're still lacking a very simple case which this answer is going to provide: Reversed Fibonacci! So given F_n your job is to find n, ensuring that you also validate whether the index is even or ...
evolcodegolf
Objective Utilize any editor or IDE (such as vim, emacs, IntelliJ, etc.) to compose a valid "Hello, World" program in any C-like language, noting that the "!" is optional, though using it may earn additional stylistic points. You may incorporate publicly available plugins and a publicly available vimrc; however, you ...
evolcodegolf
The essence of this task is to locate all the potential phrases from a curated list within a multi-dimensional matrix of symbols. Your input must be formatted in the following manner: [your phrases as a sequence of space-separated words] [a matrix of characters] Example: The quick brown qkbr Theo woxn Criteria for i...
evolcodegolf
Given a number \$n\$, Euler's totient function, \$\varphi(n)\$, quantifies the integers up to \$n\$ that remain coprime to \$n\$, implying that no integer greater than \$1\$ can evenly divide both values. For instance, \$\varphi(6) = 2\$, since the only integers that meet this criterion are \$1\$ and \$5\$. This functi...
evolcodegolf
Introduction The Enigma cipher machine, a pioneering electro-mechanical rotor device utilized during the tumultuous era of World War II, operated under a unique principle where the key altered after encoding each individual character. This operational mechanism was deemed unbreakable by German cryptographers due to i...
evolcodegolf