instruction_seed
stringlengths
29
40.5k
source
stringclasses
6 values
Background Consider a numerical sequence defined through a recursive formula: The initial element is 0; The subsequent element is 4; From the third element onward, its value can be derived by: 1. Identifying the integer set from 0 up to the preceding element of the sequence (whether inclusive or exclusi...
evolcodegolf
It's great to see everyone's enthusiasm returning! This time, we have implemented a well-defined scoring criterion for this challenge! Recently, I conceptualized a task that, while seemingly straightforward, offers a broad spectrum of potential solutions, making it ideally suited to the inventive nature of the PPCG co...
evolcodegolf
As a bartender managing a lively establishment, you find that while your patrons often enjoy their time, many tend to stick to the same beverage, which you believe could benefit from some variety. To address this, you devise a dynamic pricing system where the cost of a drink adjusts based on sales, yet remains within s...
evolcodegolf
In the decimal numeral system, every perfect square concludes with the digits \$0\$, \$1\$, \$4\$, \$5\$, \$6\$, or \$9\$. Conversely, within the hexadecimal system, all perfect squares end with \$0\$, \$1\$, \$4\$, or \$9\$. Nilknarf elucidates the rationale behind this phenomenon and the method for deriving it effect...
evolcodegolf
In the landscape of prevalent modern graphical desktop interfaces, executing a double-click action on a segment of text results in the selection of the specific word surrounding the cursor's position within that text. For instance, if we denote | as the location of your cursor in the string abc de|f ghi, initiating a d...
evolcodegolf
Introduction In accordance with Rand Al'Thor's post in the Puzzling SE community, a word is deemed close-knit if it encompasses three consecutive letters from the alphabet in any sequence. Examples of such words include education, foghorn, and cabaret, while terms like learning, klaxon, and perform fall outside this ...
evolcodegolf
Input The input consists of a single positive integer n, representing a numerical value. Output The output should yield the integer result obtained by altering n to set its most significant bit to 0, thereby producing a new integer. Test Cases 1 -> 0 2 -> 0 10 -> 2 16 -> 0 100 -> 36 267 -> 11 350 ...
evolcodegolf
Initially, I would like to extend warm wishes for a Merry Christmas to all (apologies for the slight delay due to timezone differences). In celebration of this festive occasion, we will embark on a task to create a snowflake representation. Notably, since the year is 2015 and the predominant date for Christmas falls on...
evolcodegolf
As the school year commences, you find yourself in a part-time position at the library, where the head librarian is astonishingly unaware of the Dewey Decimal System and has permitted an "organic" evolution of the sorting methodology as the collection has expanded. In a bid to maintain your composure amidst the chaos, ...
evolcodegolf
Inspiration Given a positive integer \$1 \leq n \leq 9\$, your task is to output all positive \$n\$-digit integers \$i\$ that satisfy a series of specific conditions: 1. Each digit from \$1\$ to \$n\$ appears exactly once in \$i\$, meaning \$i\$ consists of a permutation of the digits from \$1\$ to \$n\$. 2. The int...
evolcodegolf
The intriguing puzzle, conceived by Eric Angelini in September 2007, explores a unique sequence that, according to A131744, adheres to a specific rule involving the English nomenclature of its entries. The transformation entails substituting each character with its positional rank in the English alphabet, subsequently ...
evolcodegolf
Produce the condensed representation of the numerical sequence A297359, which initiates with the following elements: 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 2, 4, 6, 4, 2, 1, 6, 10, 10, 6, 1, 1, 7, 16, 20, 16, 7, 1, 3, 8, 23, 36, 36, 23, 8, 3, 3, 11, 31, 59, 72, 59, 31, 11, 3, 1, 14, 42, 90, 131, 131, 90, 42, 14, 1,... ---------...
evolcodegolf
In this challenge, you will be provided with a list of positive integers \$W\$ referred to as a word, accompanied by a square symmetric matrix \$M\$. Your objective is to ascertain whether the word can be transformed into the empty list by executing a series of valid operations, while ensuring that the maximum integer ...
evolcodegolf
Construct a square multiplication grid with dimensions n x n and transform each cell's value to its residue following division by n. For illustrative purposes, consider a 6x6 grid and its resultant "modulo 6" configuration: (Disregard the final column and row as they are empty) 1 2 3 4 5 6 | 1 2 3 4 5 2 4 ...
evolcodegolf
I find myself questioning the feasibility of this endeavor, yet I believe it merits exploration. The Challenge Develop and conceptualize a pseudo-random number generator that not only aims to produce results uniformly distributed with analogous frequencies but also incorporates a unique mechanism. The generator mus...
evolcodegolf
Challenge The goal of this challenge is to devise a function that takes two distinct paragraphs and outputs a concatenated result, ensuring the removal of any duplicated overlapping lines caused by redundancy (while preserving a single instance of the duplicated segments to avert information loss). Each input paragra...
evolcodegolf
In the realm of rational numbers, we know that they can be expressed in decimal form either as terminating or repeating sequences. For instance, the fraction 5/8 translates to the decimal 0.625, which is terminating, while 1/3 becomes 0.333..., a repeating decimal. For this task, you will take a positive rational num...
evolcodegolf
Robbers thread Cops Understanding slicing It’s crucial to grasp that slices are indexed beginning from zero. Consider this slice: [2:]. When applied to the string "abcde", the outcome will yield "cde," since this instruction effectively means "retrieve all elements situated at indices exceeding 2." Now, let’s exa...
evolcodegolf
In celebration of Neil's remarkable achievement of reaching 100k reputation points, we are embarking on a detailed exploration of 'Neil numbers'. Neil's user ID is 17602, which possesses a distinctive attribute in its binary form: $$17602_{10}=1\color{blue}{000}1\color{blue}{00}11\color{blue}{0000}1\color{blue}{0}_2$$ ...
evolcodegolf
The term "levencycle" draws its inspiration from the intriguing cyclic levenquine challenge, merging two fascinating mathematical concepts. Definitions A 1-dup permutation of order \$n\$ is defined as any permutation comprising the integers \$1, \cdots, n\$ supplemented by one additional duplicate number from the same...
evolcodegolf
Identify a Lyndon word, which is defined as a binary string that remains strictly lexicographically smaller than all of its cyclic rotations, while meticulously detailing each step of the reasoning process you employ to arrive at your conclusion. For clarification, consider the binary string 001011: its rotations—00101...
evolcodegolf
Design a function that takes as input a sorted array composed entirely of positive integers, denoted as A, alongside an integer n. The objective is to systematically compute and display all unique subsets of A whose elements collectively sum to n, ensuring that subsets differing only in element order are not duplicated...
evolcodegolf
Inspired by a real-life scenario, which I have asked for an answer to here: https://superuser.com/questions/1312212/writing-a-formula-to-count-how-many-times-each-date-appears-in-a-set-of-date-ran Given an array of timespans (or startdate-enddate pairs), output a count of how many timespans cover each day, for all day...
evolcodegolf
Input: An integer M representing the number of points and a list of their coordinates in 3D space (x, y, z). Expected output: The minimal volume difference between the polyhedron formed by the points and a tetrahedron that shares at least 3 vertices with the polyhedron. If no such tetrahedron exists, output -1. Example...
evolcodegolf
Transform the following Rövarspråket encoded string, utilized frequently by Swedish youth and inspired by the Kalle Blomkvist tales penned by Astrid Lindgren, into its original form through an efficient programmatic approach. The encoding employs specific conventions, as outlined below (sourced from Wikipedia): 1. Eac...
evolcodegolf
In order to enhance the security of our company’s data handling protocols, we are considering the implementation of Gray code numbers—where consecutive values vary by a single bit—as a substitute for traditional binary numbers. I need assistance in developing a program that reliably converts individual integers to thei...
evolcodegolf
This inquiry serves as my inaugural question within the realm of Code Golf, which I encountered on Stack Overflow. While the original problem was framed in JavaScript, all programming languages are permitted for this challenge. The task requires generating and visually presenting an NxN grid (with N constrained to valu...
evolcodegolf
Devise an innovative program that produces a numerical sequence commencing with zero, followed by 100 randomly generated integers ranging from -9 to 9. This sequence should be visually represented as an undulating roller coaster, where any increase in value results in an upward motion and any decrease triggers a downwa...
evolcodegolf
Intro: You inadvertently disrupted the continuum of time through a device you ingeniously designed for amusement, which unexpectedly transformed into a time machine. Consequently, you were propelled into a distant future. Upon your arrival, you discerned that computing technology, processing capabilities, and computer...
evolcodegolf
Puzzle In this puzzle, you need to convert a given string of letters (case insensitive) into their corresponding positions in the Fibonacci sequence, and vice versa. (A => 1, B => 1, C => 2, D => 3, E => 5, F => 8, G => 13, H => 21, etc.) For example: A, B, C -> 1, 1, 2 D, E, F -> 3, 5, 8 1, 1, 2 -> A, B, C...
evolcodegolf
Examine the intricacies of the Fibonacci Numbers, where an intriguing pattern in their parity emerges: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144. It becomes evident that every third integer in this sequence is even, while the intervening integers are consistently odd. This phenomenon can be rationalized by recognizi...
evolcodegolf
Embarking on the creative endeavor we’ve previously explored twice by constructing 'error quines' (as per Make an error quine! and Make a slow error quine maker!), let us now pivot our focus to an intriguing counter-challenge. Instructions Devise a "program" that, upon execution, intentionally generates an error. Sub...
evolcodegolf
Your task is to devise a program or function that meticulously checks if a string qualifies as a valid phone number. Given a string (or list of characters/codepoints) input, you will output a truthy value if the input is a valid phone number. If it is not, output a falsey value. An input string is considered a valid ph...
evolcodegolf
Connect-Three AI Championship Welcome to the Connect-Three Championship! In this unique competition, instead of the traditional Four-In-A-Row, we will be playing a variant called Connect-Three. However, our competitors will be AI programs battling it out! This challenge must be tackled using Python. Rules Basic G...
evolcodegolf
In a creative twist on visual representation, imagine translating not just single digits but entire alphabetic characters into a segmented format using ASCII art. Here’s how it would work: Each letter (A-Z) can be depicted using a grid of segments, similar to the 7-segment display used for numbers. The letters will be...
evolcodegolf
Design a multi-functional truth table processor (MFTP) that extends the concept of logic gates by accommodating three input wires, X, Y, and Z, along with five auxiliary inputs M_, M_x, M_y, M_z, and M_xy, to generate an output M(x, y, z). The function operates as follows: - Output M_ when all inputs X, Y, and Z are 0...
evolcodegolf
Construct a balanced binary search tree represented as an array from a distinct, ordered collection of integers without employing recursive techniques. For instance: func( [1,2,3,5,8,13,21] ) => [5,2,13,1,3,8,21] To facilitate this task, consider the simplification that arises from the precondition of the sorted nat...
evolcodegolf
Construct a visual representation inspired by a unique challenge encountered on Codingame roughly one month prior, which proved to be quite complex. Given an intricate binary tree populated with words, such as: HELLO / \ WORLD EATING / / \ ARCH IDAHO ...
evolcodegolf
Consider the function Extract(n, startIndex, count) that extracts count digits from the number n starting from the digit at position startIndex. Examples: Extract(9876, 1, 2) = 87 Extract(456789, 3, 4) = 6789 Extract(3201, 0, 1) = 3 Extract(91011, 2, 3) = 101 We will define a number Y as resilient if at least one Extr...
evolcodegolf
RFC 2550, a satirical proposal published on April 1, 1999, outlines an intricate and space-efficient ASCII representation of timestamps, accommodating any date, including those predating the universe and extending beyond its projected conclusion. The methodology for calculating a timestamp compliant with RFC 2550 encom...
evolcodegolf
Digital image processing often employs unique filter arrangements to capture colors more effectively. One such arrangement is the X-Trans filter, which differs from the conventional Bayer filter by utilizing a non-repeating pattern that enhances color fidelity and reduces moiré patterns. Your objective is to decode an ...
evolcodegolf
Utilizing solely a straightedge and compass, execute the inscription of a rhombus within the specified rectangular figure, ensuring that two of its opposite vertices are coincident with designated points of the rectangle. Input Input comprises the measurements of the rectangle. In the depicted instance, those would be...
evolcodegolf
Your task is to accept a binary string input and derive all binary numbers that lie between the original string and the reverse of its string representation, acknowledging that the reversed string can either exceed or fall short of the original in numerical value. All outputted binary numbers must be zero-padded to ens...
evolcodegolf
Task: Given a single character input that must be one of the directional symbols <>^v, generate a corresponding output that consists of printable ASCII characters (ranging from space to tilde), aligned according to the specified arrow orientation. For instance, let's consider the secondary input to the program as ABC. ...
evolcodegolf
Given a positive integer n, generate and display all unique decimal numbers that can be formed with n bits, organizing them in a novel sequence. Begin by listing numbers created with a single isolated 1 in the binary representation (in ascending order), followed by those formed with pairs of non-consecutive 1s, then tr...
evolcodegolf
As an intrepid explorer navigating the uncharted expanses of a mysterious world, you find your vessel propelled by the whims of the wind, charting a course through the unknown. Each day, your keen eyes peer through the spyglass to discern various geographical features in the four cardinal directions: north, south, east...
evolcodegolf
Your task is to program a mathematical function \$s\$, that takes a nonempty finite set \$A\$ of unique points in the 2D plane, and outputs an uncircularity score \$s(A)\$ that satisfies the following properties: Positive Definiteness: If there is a circle or a straight line that contains all points of \$A\$, then \$s...
evolcodegolf
You can depict a triangular number, T(N), by writing one 1 on a line, then two 2's on the line below, then three 3's on the line below that, and so on until N N's. You end up with a triangle of T(N) numbers, hence the name. For example, T(1) through T(5): 1 1 22 1 22 333 1 22 333 4444 1 22 3...
evolcodegolf
Objective Your goal is to develop a program that efficiently converts a given input string into its corresponding acronym. The input will solely consist of alphabetic characters and spaces, and will maintain exactly one space between each word. It is imperative that your output accurately reflects the acronym derived...
evolcodegolf
Consider a sequence \( A \) comprised of integers with a specified length \( n \). The challenge of determining the k-max subarray sum involves identifying up to \( k \leq 3 \) (contiguous) non-overlapping subarrays within \( A \) that yield the highest sum. It is crucial to note that if all elements in \( A \) are neg...
evolcodegolf
The Kolakoski sequence (OEIS A000002) is a fascinating construct defined as follows: The Kolakoski sequence, comprised solely of the integers 1 and 2, specifies that the nth element represents the length of the nth contiguous group (or run) of identical elements within the sequence itself. The initial 20 terms of this...
evolcodegolf
Program: To evaluate the cumulative product of the ASCII values of each character in a specified string. (No need to display the output. The final product can be calculated in any numerical system without reverting to decimal.) Test case: AbC= 0061*0062*0063= 0A2C Condition: If the program is executed, the result...
evolcodegolf
Create a sophisticated program or function that emulates the mechanics of common dice utilized in role-playing games, specifically catering to the d6 and d20, which are among the most prevalent dice types. The implementation must adhere to the expectations of stereotypical gamers, diverging from the conventional princi...
evolcodegolf
To achieve the goal of identifying the smallest non-zero natural number b such that the product of any given non-zero natural number a and b yields a palindromic result—defined as a sequence of digits that remains invariant when read in reverse—implement a solution capable of handling input for a through various accept...
evolcodegolf
Your objective, should you decide to take it on, involves a multifaceted challenge. Objective Design a program that, upon execution, outputs a selection of terms from a sequence of your choosing, ensuring that the sequence qualifies as an authentic OEIS sequence. The intriguing aspect lies in the stipulation that i...
evolcodegolf
I embarked on a CodeWars kata challenge utilizing Python just two days ago, focusing on the concept of code golf. Task: Given two congruent circles, denoted as a and b, each possessing a radius r, compute the precise area of their intersection, ensuring the result is rounded down to the nearest integer, and do so wit...
evolcodegolf
The challenge involves accurately tracing (drawing) the trajectory delineated by the following commands: ^n - ascend by n lines vn - descend by n lines >n - advance to the right by n character positions <n - retreat to the left by n character positions Here, n is defined as a positive integer, meaning commands such a...
evolcodegolf
In a prior analysis, we explored the concept of the pseudofactorial for a given number, defined as the least common multiple (LCM) of all integers from 1 up to n. This notion proves advantageous when it comes to the addition of fractions. Nevertheless, an inconsistency arises: upon evaluating the sum of the fractions 1...
evolcodegolf
A captivating Indian folklore narrates the tale of the purported creator of the strategic board game of chess, who astonished the Indian emperor with his extraordinary gameplay to such an extent that he would receive rewards of any nature he desired. In a display of humility, the individual requested compensation in th...
evolcodegolf
Introduction Your task is to generate the first 1000 terms in the continued fraction representation of the digit-wise product of square root of 5 and square root of 7. In other words, produce exactly the following list (but the output format is flexible): [3, 3, 2, 1, 2, 1, 5, 1, 2, 4, 2, 9, 12, 1, 1, 2, 3, 3, 1,...
evolcodegolf
Here is my unrefined Ruby code for a function that I seek to optimize through golf: Iter =-> k { str = "" (0..k).map{|m| str += "-> f#{m} {"} str += "f#{k}.times{f1 = f0[f1]};f1" (2..k).map{|m| str += "[f#{m}]"} eval(str + "}" * (k+1)) } The most effective approach I've discovered to golf this is p...
evolcodegolf
Formulated from a historical technical guide... The task at hand I define the ath suffix vector of b as a boolean array with a length of a that consists of b terminal truthy values. Develop a program or function that, given parameters a and b by any means, generates the ath suffix vector of b through any appropriate me...
evolcodegolf
Goal: The objective is to take a given string and determine the number of contributions to be made on specific days, ensuring the output visually represents the intended message. Specification Input Support letters plus space (i.e. [A-Za-z ] ) Space is a blank 3X7 The letters are defined in this 5x7 DOT Matrix font ...
evolcodegolf
In the expansive universe of Pokémon, there exists a plethora of unique species™. A key aspect that distinguishes each Pokémon is its type classification, wherein every individual Pokémon is characterized by a primary type and may additionally possess a secondary type—potentially leading to a combination of up to two d...
evolcodegolf
Edit: I will award a 100-reputation bounty for the first solver of the bonus puzzle at the end of the question! I will add the bounty to the question only when the answer appears as this bounty has no deadline. Given a non-decreasing list of one-digit positive integers, you should determine how deep dungeon the digits...
evolcodegolf
There exist two distinct forms of nouns, namely singular and plural, and the process of converting between these forms is generally straightforward, yet it involves several specific rules that must be followed meticulously. Typically, the plural form is constructed by appending an 's' to the end of the singular noun. ...
evolcodegolf
Challenge Description You are tasked with creating an intricate simulation of precipitation within a terminal environment. In the provided illustration below, the program generates 100 simulated raindrops at arbitrary coordinates (utilizing the default random functionality inherent in your programming language), paus...
evolcodegolf
In the elaboration of this intricate challenge, the subsequent board structure will serve as a reference for positional arrangements: ABC DEF GHI For example, during a traditional tic-tac-toe match, the sequence B E A C G D F H I denotes the following: -X- -X- XX- XXO XXO XXO XXO XXO XXO --- -O- -O...
evolcodegolf
Given two distinct 16-bit integers x and y, determine the minimum sequence of bitwise operations required to convert x into y. The allowed operations include: - **bitwise AND**: Combines bits from both numbers, retaining a bit only if both corresponding bits are 1. - **bitwise OR**: Combines bits from both numbers, re...
evolcodegolf
Given a specified distance, expressed in meters and constrained within the integer range of \$60\le d \le 260\$, determine the total number of golf clubs that can be utilized based on the following detailed chart, where both \$min\$ and \$max\$ distances are considered inclusive: club | min | max ----------...
evolcodegolf
Consider the following key points: Initially, we delve into the concept of fortunate numbers. The generation of these fortunate numbers follows a specific methodology: Begin with the entire sequence of natural numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20... Subsequently, eliminate e...
evolcodegolf
Challenge You are tasked with manipulating a pair of strings: one string delineating a cutting rule and another string from which portions are to be excised according to the specifications outlined in the first string. Each string will consist solely of letters ranging from a-z or A-Z, and they do not need to maintai...
evolcodegolf
The month of June in the year 2020 features a calendar layout where June 1st falls on a Monday and progresses through the week, with June 7th ending on a Sunday. For your reference, the layout of June 2020 is provided below. June 2020 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1...
evolcodegolf
Each positive integer can be represented as the sum of at most three distinct palindromic positive integers in any numeral system with a base b where b≥5, as demonstrated by Cilleruelo et al. in 2017. A positive integer qualifies as palindromic within a specified base if its expression in that base, without any leadin...
evolcodegolf
Imagine you’ve often pondered the curious existence of being an intermediary handler of web requests. Who wouldn’t? Today, your mission involves fulfilling this peculiar aspiration (even if just partially). A popular online platform, known as Site Y, encounters a significant influx of requests daily. They're eager for ...
evolcodegolf
A highly effective strategy for minimizing Python code length is to eliminate unnecessary spaces. However, for those who find themselves pressed for time and unable to meticulously identify which spaces to discard, an efficient solution is sought. Task Given a solitary line of Python code as input, produce a revised ...
evolcodegolf
Lisp programmers often claim that Lisp represents a robust language that can be constructed from an extremely limited set of fundamental operations. To explore this assertion in depth, your task is to create a golfed interpreter for a dialect known as tinylisp, while meticulously considering the nuances of the followin...
evolcodegolf
In the realm of data integrity, Adler-32 serves as a 32-bit checksum algorithm developed by Mark Adler in 1995, integrated into the widely adopted zlib library, also a product of Adler's design. While Adler-32 lacks the robustness of a 32-bit cyclic redundancy check, it notably outperforms in terms of computational spe...
evolcodegolf
Challenge: Imagine a vast library filled with thousands of unique books, each with an intriguing title. I have a great memory and can recall every title perfectly, but I'm also quite selective about my time and don't enjoy extensive searches—each extra character I have to type feels like a burden! What is the most eff...
evolcodegolf
Sandbox Have y'all ever encountered the perplexing issue of writing an answer embedded with unprintable ASCII characters and yearned for an efficient method to represent those characters in a visually accessible format? This is precisely the purpose behind the establishment of the Control Pictures Unicode block. Ho...
evolcodegolf
I am currently in the process of converting a Float32Array to an Int32Array for input into a real-time audio raw PCM to MP3 recording application, while ensuring that the resulting integer values do not exceed a specified maximum threshold to prevent distortion. new Int32Array([...new Float32Array(b)].map(f => f < 0 ?...
evolcodegolf
Given a set of 3 bytes, commonly represented as RGB values, your task is to thoroughly compute the nearest corresponding CMYK values, followed by outputting these values in a specified format. Please design either a function that accepts parameters and returns the calculated CMYK values or a complete program that util...
evolcodegolf
Calculate the discrepancy between the squared total of a series and the total of the squares of each individual element within that series. This can be mathematically expressed as: \$\left(\sum_{i=a}^{b} i\right)^2 - \sum_{i=a}^{b} i^2\$ Your function or algorithm should accept two parameters representing the inclu...
evolcodegolf
In various programming scenarios, particularly in fields such as cryptography, utilizing prime numbers is often necessary; however, there may also be instances when composite numbers are required. Furthermore, the context of this challenge necessitates that your program be adaptable to arbitrary modifications. Moreover...
evolcodegolf
The task is to uncover a missing prime number in a continuous sequence of concatenated integers, all of which are prime. You are provided with a string of digits (valid input will conform to the regular expression ^[2-9][0-9]*$). The string represents a sequence of prime numbers. For instance, 23571113. Each number in ...
evolcodegolf
Starting with a positive integer M, determine the largest integer M' that can be derived by successively multiplying M by any of its digits (in base-10). Each digit chosen must be a non-zero digit that is a factor of M. Example #1 The expected output for M = 36 is M' = 108: Example #2 The expected output for M =...
evolcodegolf
Craft a challenge where participants must calculate the product of the first n prime numbers, and return the result as a string formatted in hexadecimal. This task is inspired by OEIS A000040, but the sequence begins with the first prime, which is 2. The objective is to minimize code length, with the winner having the ...
evolcodegolf
In a manner akin to the Catalogue of a basic "hello world" program, I am seeking to develop a comprehensive catalogue that elucidates diverse, succinct methodologies for generating a CSV format. CSV Definition: In this context, CSV refers to the more precise interpretation of a string representation of a list or arra...
evolcodegolf
Design a function that takes two sets of n-dimensional arrays of characters as input: one called 'x' and the other 'y'. Your goal is to assess whether 'y' encompasses 'x' in any orientation (including rotations or reflections). If 'x' can be found within 'y' in any configuration, return true; if not, return false. Sa...
evolcodegolf
You have been contracted by a bomb defusing organization to carry out a series of "controlled" demolitions of unexploded ordnance. A list of bombs is provided, represented by non-negative integers. [3,2,4,0,3,1,2] During each step, you can initiate the explosion of a bomb. When a bomb \$n\$ detonates, it obliterat...
evolcodegolf
During a road trip involving N individuals, each participant contributes a different amount towards the fuel expenses incurred throughout the journey. At the conclusion of this trip, you are tasked with determining the least number of monetary exchanges required to ensure that all individuals have equally shared the to...
evolcodegolf
### Introduction This task presents a unique challenge: identifying the perfect squares within a given range of positive integers. It builds upon a simpler numerical challenge but adds a layer of complexity to engage participants at an entry-level. ### The Challenge Develop a program or function that takes two strictl...
evolcodegolf
Design a program that calculates the equivalent resistance between two nodes in a resistor network that can include complex components such as capacitors and inductors in addition to resistors. The resistance, capacitance, and inductance will be represented as an enhanced graph where each edge has a tuple indicating th...
evolcodegolf
I find this inquiry particularly intriguing. I have developed a concise program utilizing Objective-C to convert a given string into a brainfuck representation, as illustrated below: ```objc NSString *input; // set this to your input string NSMutableString *output = [[NSMutableString alloc] init]; int currentPosition...
evolcodegolf
Emmet is a versatile text-editor and IDE plugin tailored for the efficient writing of HTML code, requiring significantly fewer keystrokes. You might conceptualize it akin to a code-golfing preprocessor specifically for HTML. Its syntax is intricately derived from CSS selectors, introducing layers of complexity in docum...
evolcodegolf
Develop High-Quality Enterprise Code! TL;DR Responses must encapsulate a comprehensive program (not exceeding 30k characters) that effectively outputs the first N prime numbers (formatted as base 10 integers devoid of leading zeros, except in languages that only utilize unary or other specific output forms) with each ...
evolcodegolf
In certain geographic regions, telephone numbers adhere to a rigid length specification, which may be perceived as uninteresting. Your task, for this computational exercise, is to manipulate the sequence of digits comprising what is presumed to be a legitimate telephone number, formatting it according to a set of nuanc...
evolcodegolf
Construct a function that processes an array consisting of integers to determine "the successor to the central value". The successor to the central value is defined as the smallest integer that is greater than the minimum value derived from the mean, median, and mode of the provided set, ensuring it is distinct from t...
evolcodegolf
An unrooted binary tree, defined as a tree structure characterized by a singular connected component devoid of cycles, must adhere to the condition that each vertex possesses either one or three connections. This type of tree is particularly significant in the field of bioinformatics, where it is utilized to represent ...
evolcodegolf
Rule 110 is a fascinating cellular automaton that exhibits a variety of intriguing properties. Your objective is to create a simulation of Rule 110 utilizing the fewest characters possible. For those unfamiliar with the concept, Rule 110 operates by processing each cell in a grid line by line. Each cell evaluates the s...
evolcodegolf