instruction stringlengths 34 53.1k |
|---|
The usual rules: no external resources, or the like. Input will be a positive integer in valid Roman numeral format less than 10 thousand, say.
Use all the Roman numeral characters:
I = 1
V = 5
X = 10
L = 50
C = 100
D = 500
M = 1,000
Respect subtractive notation (copied from the Wikipedia page):
the numeral ... |
The challenge:
Make a function that finds the longest palindrome inside a string.
Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More information here.
|
The challenge:
Generate a random sequence of numbers. The only input should be the length of the sequence.
Extra internet points for pure-functional solutions.
Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More information here.
|
Write a function that contains five lines.
If you run the function as-is, it should return 0.
If you remove any one of the five lines and run the function, it should tell you which of the lines has been removed (e.g., if you remove the final line it should return 5).
Brevity, novelty, and elegance all deserve considera... |
The challenge:
Input text from one file and output it to another. Solution should be a complete, working function.
Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More information here.
|
The problem:
I am the lead developer for a big company, we are making Skynet. I have been assigned to
Write a function that inputs and returns their sum
RULES:
No answers like
function sum(a,b){
return "their sum";
}
EDIT: The accepted answer will be the one with the most upvotes on January 1st, 2014
Note: Th... |
The goal is to write a full program that emulates the Universal Machine from ICFP 2006 with the shortest code. The Universal Machine has a very simple instruction set explained here. The emulator has to read a filename from command-line argument, and run the file as the program, so your language has to support command-... |
My homework assignment is take a string and split it into pieces at every new line. I have no idea what to do! Please help!
Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More information here.
|
This is a code-golf question. You need to take the contents of two separate files (i.txt and o.txt) and swap them. You can create a third file to help you with the process, but have your program delete it after the file contents are swapped. Renaming the files is now allowed again.
Programs must work for any file co... |
I'm searching (am I?) for a piece of code that quits immediately - in an absolutely unconventional way.
This does not mean: System.exit((int) 'A'); (Java).
It might mean:
#!/usr/bin/env python3
# NOTE: This kills ALL RUNNING Python processes. Be careful!
def exit():
import os
os.system("killall python3")
# ... |
Requirements
For the sake of the challenge let's define a unit:
A unit is defined as any point that compose the grid in which the face is drawn (pixels for screen, characters for ASCII art, etc..).
The minimal requirements for the face are:
A smiley face is composed of a shape that resemble a circle (not necessari... |
The challenge:
Write a program or a function that inputs a positive number and returns its factorial.
Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More information here. Every code-trolling question is also a popularity-contest question, so the highest voted answer... |
Given three integers N,D,R write a program to output Rth digit after the decimal point in the decimal expansion for a given proper fraction N/D.
|
Help guys my assignment says it needs to be in .pdf format but I did it in Word. I'm really stuck.
How do I take a word document in .docx format and make a .pdf that contains all the text from it? Bonus points if it also contains all the images and any formatting, but text is a bare minimum. The sample file I'll be usi... |
There are a range of questions revolving around this concept, but these all seem to just involve causing a crash, resulting in many answers which are very obviously designed to cause a crash. So the challenge I set you is to write some plausible code (although what the codes supposed "intention" is I leave up to you), ... |
Create a function which takes an integer and returns an array of integers representing the number in balanced base twelve. Specifically, the representation should follow these rules regarding 6 & -6 (from the above link):
If the last digit of a number could be written with either 6 or ϑ, we use the one whose sign is ... |
The 9 Hole Challenge
9 code golfing challenges of varying difficulty.
Penalties for using the same language more than once.
The question will be updated with pars, hole champions and trophy winners.
This comes from a competition I have with some friends, it's not the usual format, but I hope some of you will appreci... |
Knowing a given date (11/28/1973), and supposing I will die when I'm 99, what are the years when my birthday will be a thursday so that I will be able to party all week-end?
|
Your challenge is to minify Brainfuck code, according to these rules:
Remove anything that is not one of +-><[].,.
For any group of consecutive + or - characters, if the amount of +s and -s is the same, remove them.
Do the same as above, but with > and <.
Remove sequences of the +->< characters if they do nothing. Fo... |
\$1729\$, known as the Hardy–Ramanujan number, is the smallest positive integer that can be expressed as the sum of two cubes of positive integers in two ways (\$12^3+1^3=10^3+9^3=1729\$). Given an integer \$n\$ (as input in whatever form is natural to your language of choice) find the smallest positive integer that c... |
A code-bowling is not the same as a code-golf, in a Code-Bowling, you should solve the challenge in as many characters as possible. The goal of this Code-Bowling is to create a quine in as many characters as possible, but you still should try to remove redundant characters. For example, don't post a HQ9+ solution with ... |
True Story: Several years ago while interviewing at an investment advisory firm that managed over a billion dollars in client funds, I was asked a collection of reasonable and bizarre questions by a partner in the firm. An example of a reasonable question would be "What can go wrong with a linear fit?".
But then, thi... |
In my previous code challenge, I asked you to write a function that tells you which of its lines has been removed.
The instructions were:
Write a function that contains five lines.
If you run the function as-is, it should return 0.
If you remove any one of the five lines and run the function, it
should tell you whic... |
I saw this question on https://mathematica.stackexchange.com/ and I think it's pretty cool. Let's make the snowflake with other programming languages.
This is a quote from the original question:
'Tis the season... And it's about time I posed my first question on Mathematica Stack Exchange. So, here's an holiday quest ... |
Simply put, the Perrin sequence has the following recurrence relation:
P(n) = P(n-2) + P(n-3);
P(0) = 3; P(1) = 0; P(2) = 2;
But wait!! There's more!!
The Perrin sequence has a very bizarre property:
If N is prime, then P(N) mod N = 0.
Furthermore, there are very few composite numbers which have this property. Thi... |
Make a program which prints just another #{LANG} hacker where #{LANG} is the name of the language with which the program is being run.
For example, if I run your program with Bash, I'd expect just another Bash hacker as the output, but when running the same program through C++, I'd expect the output to be just another ... |
The goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism!
The Challenge
Your challenge is to implement a program that will map some genes using cross-over frequencies, in as many programming languages as possible. You are allowed to use any ... |
It's time to make a more advanced program (rather than something simple, like printing some shape). You need a package manager for something, I guess.
First of all, if something wasn't defined, you are allowed to do anything, including destroying the computer (but please, don't, unless this will save your characters). ... |
Write a function which for any given input array of numbers and a row number r, returns the r-th vector or array where each subsequent vector or array is constructed from the previous following the rules used in Pascal's Triangle. For example, for an input vector of [3 1 2] and a row number of 1 (indicating the 'next' ... |
I am planning to write an improved GolfScript for even shorter programs that can do more things. This is not a challenge; it is a request for feedback and tips on what I should do. (see tags)
I'm not sure if this should be Community Wiki. If you think so, just flag for a moderator to convert it :)
This language will be... |
The goal of this code-golf is to create a program that takes a string as input, and you have to output the SHA-1 hash value as a hexadecimal number. You can find the pseudocode for SHA-1 here
Other rules:
No network access
You're not allowed to run external programs
You're not allowed to use built-in methods to hash t... |
Let's waste some time coming up with stupid ideas which are close cousins of good ideas.
Your useless command doesn't have to fit any minimum or maximum length.
Do, however, try to turn it into a one-liner if you can.
No particular requirement for what shells and utilities are used, within reason.
He who wins, wins.
... |
Note to challenge writers as per meta consensus:
This question was well-received when it was posted, but challenges
like this, asking answerers to Do X without using
Y
are likely to be poorly received. Try using the
sandbox
to get feedback on if you want to post a similar challenge.
It's 2017 2018 2019 2020 2021 20... |
Physics Challenge
This program should be able to solve for ANY two of the following variables the user wants to solve.
s (displacement)
v (velocity)
u (initial velocity)
a (acceleration)
t (time)
At start the user must choose two variables they want to solve for and what variables they can supply. You are limited t... |
Create a program that halts exactly 50% of the time. Be original. Highest voted answer wins. By exactly I mean that on each run there is a 50% chance of it halting.
|
Farmer Jack is very poor. He wants to light his whole farm but with minimum of cost. A lamp can illuminate its own cell as well as its eight neighbors . He has arranged the lamps in his field but he needs your help in finding out whether or not he has kept any extra lamps.
Extra lamps : Lamps which on removing from the... |
The point of this puzzle is to learn how a malicious code can be hidden and discovered in a program.
A person is asking the question:
Plz give me some code that how can I search a file may be in Present
Directory or in its Sub-Directories.
(This is a variant of a real question I've seen posted on one site.)
To be m... |
(Based on this Math.SE problem, which also provides some graphics)
I have a stick which looks kinda like this:
I want it to look kinda like this:
I'm not an expert painter, however, so before I start such an ambitious DIY project, I want to make sure that I'm not in over my head.
Your program should tell me how how ... |
I recently saw this Javascript code on StackOverflow for merging two arrays, and removing duplicates:
Array.prototype.unique = function() {
var a = this.concat();
for(var i=0; i<a.length; ++i) {
for(var j=i+1; j<a.length; ++j) {
if(a[i] === a[j])
a.splice(j--, 1);
}
... |
I want a program that outputs "hello world" on console on my x86_64 based Linux computer. Yes, a complete program, not something silly that needs an interpreter or a compiler to work.
You may:
use all glibc functionality
submit a static executable
submit a dynamic executable with dependencies if you outline them
comp... |
I want to write x86 assembler code that can be used to boot your computer from and dims NumLock. This means
you cannot rely on glibc or any other of these "comfi" libraries
you cannot rely on the Linux kernel
we will test your code by dumping it onto a virtual floppy and boot a VM from it
goal is to switch on and off... |
Imagine a two-dimensional array of boolean values, where the 0s represent squares of grass on a rectangular plot of land and the 1s represent fences.
Write a function that accepts the 2D array as an input and determines whether you can travel from any one area of grass to any other area of grass, using only north/east/... |
You have a program which creates an index for a catalogue. The last step is missing: it must find and consolidate page ranges within the list of pages for each entry.
Each entry is currently an array of unique integers in order, e.g:
[18,19,20,21,22,47,56,57,62,67,68,69,70]
Write a function which returns a consolidat... |
This kind of question has been asked before, but I wanted to make it more specific. The linked question asks to read from stdin and rot13 the input. I don't want the disadvantage of I/O code that differs a lot for each language in length.
The challenge:
Write a function that will ROT13 (wiki link) one char (as defined... |
I took inspiration from a challenge I did some years ago in a programming competition.
Your goal is to write a function that generates a random integer number between 0 and 150 (included), and then prints it in actual words. For example, 139 would be printed as onehundredthirtynine.
Rules:
You cannot use any external ... |
Write a program that converts a decimal to a mixed, simplified fraction.
Sample input:
5.2
Sample output:
5 + (1/5)
The code with the shortest length in bytes wins.
|
Create a brainfu*k program that can act like a simple server. It will be given a JSON representation of a file folder to serve from. It'll look something like this:
{
"something.html":"<!DOCTYPE html><html>...etc",
"styles.css":"#something{background-color:red...etc",
}
and, it will also be given the name of the file ... |
Ray tracers are easy to write. At each pixel on the screen, you shoot a ray into the scene and see what it hits. For the most basic ray tracer, the ray acquires the color of the object it hit.
If you're doing shading, then you don't color the pixel immediately, instead you try to trace a ray back to the light source.... |
Rules:
Any language you choose (Standard Libraries).
Output displayed in Terminal or Windows Command Processor or any other way you prefer.(width buffer = 80)
ASCII Characters are enough. (may add Unicode)
Shouldn't fill up the entire screen at start-up (Should look like a rain, duh!).
Colors gets bonus points (+5).
E... |
Write a function which takes a list or array, and returns a list of the distinct elements, sorted in descending order by frequency.
Example:
Given:
["John","Doe","Dick","Harry","Harry","Doe","Doe","Harry","Doe","John"]
Expected return value:
["Doe","Harry","John","Dick"]
|
Richard Dawkins in his book The Blind Watchmaker, describes a Weasel program. The algorithm can be described as follows:
Start with a random string of 28 characters. Valid characters are all upppercase letters, and space.
Make 100 copies of that string, with a 5% chance per character of that character being replaced... |
Challenge
Write a function that implements C printf-style string formatting.
Rules
You must implement at least %%, %c, %s, %d and %f.
You must not use a built-in string formatting method.
You must not run external programs or connect to the Internet from your program.
It's up to you to decide how to handle invalid inp... |
EDIT I modified the wording of the rules to make some things which were implicit more explicit. I also added some emphasis to clear up some points of apparent confusion, and explicitly defined the option of making a standalone program instead of a function.
The goal here is to make a function that takes a text file (or... |
Given the following C# program outputting False, inject a 'malicious' line of code such that the program outputs True.
class Program
{
static void Main()
{
System.Console.Write("False");
;
}
}
Your answer should consist of a string that replaces the second semicolon, and causes the program ... |
For this code golf challenge, you must produce a .exe runnable on windows. After running this .exe from any path with any name it must be deleted after execution.
My reason for limiting this to windows is something like this may be significantly easier if you have some niche OS.
Language(and code) used to produce the ... |
Given a string of 1 and 2 of any length, write some code (doesn't have to be a function anymore, everything will be just fine) that calculates how many steps does it need to shrink the string to a final form, following this criterion:
If your string is 112112, this means that you have to print a 1, two 1s and a 2, like... |
Yet another Brainfuck parsing problem, but this time... different.
You are working in the Infinite Monkeys Incorporated, the company making Brainfuck programs, to solve various interesting problems (by accident, no less - after all, the company makes random programs). However, it appears that your fast Turing machines... |
Lucky numbers are those numbers which contain only "4" and/or "5". For example 4, 5, 44, 54,55,444 are lucky numbers while 457, 987 ,154 are not.
Lucky number sequence is one in which all lucky numbers exist in increasing order for example 4,5,44,45,54,55,444,445,454,455...
Now we concatenate all the lucky number... |
Write a function that rotates an integer array by a given number k.
k elements from the end should move to the beginning of array, and all other elements should move to right to make the space.
The rotation should be done in-place.
Algorithm should not run in more than O(n), where n is the size of array.
Also a constan... |
Create a program in any language, that takes an arbitrary binary input, and generates a valid C++11 program, which when compiled and run will print this binary input.
So you could do this (on linux with gcc, where program is the code you've written and file.dat is one of the test inputs):
$ cat file.dat | ./program > g... |
Task:
Find the count of numbers between A and B (inclusive) that have sum of digits equal to S.
Also print the smallest such number between A and B (inclusive).
Input:
Single line consisting of A, B, and S.
Output:
Two lines.
In first line, the number of integers between A and B having sum of digits equal to S.
In seco... |
This site had a lot of problems involving implementing various languages in interpreter tag. However, practically all of them were esoteric languages that nobody uses. Time to make an interpreter for a practical language that most of users here probably already know. Yes, it's shell script, in case you have problems re... |
Arrr... Ahoy there, me maties! Unfurl tha' mainsail! Full to starboard! Ah, feel th' wind in yer hair!
Right, me hearties... I be needin' a bit of yer codin' skills! Me crew are a li'l more modernized than meself... I still be preferrin' th' points of th' compass (see here for more info, Arrr...) while me crew are alwa... |
Make a code that gets list of badges that nobody received yet (for example, by using this website API for badges), and output the sorted list of such badges, with new line after each.
Example output (may be smaller, depending on when you do this challenge):
Archaeologist
Caucus
Constituent
Copy Editor
Deputy
Electorate... |
Your goal is to write a program that creates a random 10x10 map using 0, 1, and 2, and finds the shortest path from top-left to bottom-right, assuming that:
0 represents a grass field: anyone can walk on it;
1 represents a wall: you cannot cross it;
2 represents a portal: when entering a portal, you can move to any oth... |
Write a program that checks if the integer is a power of 2.
Sample input:
8
Sample output:
Yes
Sample input:
10
Sample output:
No
Rules:
Don't use +,- operations.
Use some sort of input stream to get the number. Input is not supposed to be initially stored in a variable.
The shortest code (in bytes) wins.
You ... |
You are given a board position for a Go game and a move to play. You need to output whether the move is legal or not, and the new board position if it is legal.
A brief explanation of Go moves: the game consists of alternatively placing black and white pieces ("stones") in empty places on a square board. Sets of pieces... |
Write a mathematical function that results in an integer representation of "hello world"
For example "hello world" in hex is 68656c6c6f20776f726c64 so the goal will be to write a mathematical program that results in a number representing "hello world".
Here is a example of a possible solution using python:
print(2*2... |
You are trying to fit a sphere into a 5-sided box, but sometimes it does not fit completely. Write a function to calculate how much of the sphere is outside (above the rim of) the box.
There are 3 possible situations:
The sphere fits completely in the box. The answer will be 0.
The sphere sits on the rim of the box. T... |
Referring to the printable ASCII character codes in decimal, we know that from 32 to 126 we have the printable characters with 32 being (space). Your challenge is to write a program using only characters from 32 to 125 (excluding 126) which when executed, prints its own source code except that each character in the sou... |
In the 2014 challenge, Michael Stern suggests using OCR to parse to 2014. I'd like to take this challenge in a different direction. Using built-in OCR from the language/standard library of your choice, design the smallest image (in bytes) which is parsed into the ASCII string "2014".
Stern's original image is 7357 byt... |
Output the following result (which is a result of calculating 6 * 9 in bases from 2 to 36). Make sure letters are uppercase, and the multiplication itself is outputed on every line.
6 * 9 = 110110
6 * 9 = 2000
6 * 9 = 312
6 * 9 = 204
6 * 9 = 130
6 * 9 = 105
6 * 9 = 66
6 * 9 = 60
6 * 9 = 54
6 * 9 = 4A
6 * 9 = 46
6 * 9 =... |
Your goal is to input any arbitrary text, such as:
This is some text
And output that text formatted as code for posts (SE-flavored Markdown) and comments (mini-Markdown) on Stack Exchange, such as:
`This is some text`
`This is some text`
However, it gets trickier. Consider the input:
Perl has a variable called $`
Th... |
The domain server requires that all employees have a strong, random password conforming to the following rules:
Exactly 15 characters long.
Keyboard-typeable characters only (as shown in code-type below). Teaching the sales to use ALT+NUMPAD codes is not permitted.
At least 1 lower case letter: abcdefghijklmnopqrstuv... |
I started one code golf challenge recently and it seems like the winner is GolfScript (surprise, surprise!). What's interesting is that there was another very strong competitor that had all chances to win over GolfScript. Its name is APL. I see a lot of answers written in APL here. It seems like this language is fairly... |
String is given in form of a variable. Let's call that variable s. It is known that the string looks like a calculation expression using +, -, *, /. There's no parentheses.
Calculate the expression inside the string and store the result in variable r (you can assume it's already declared). All the divisions can be perf... |
The following code will produce a run-time error, stackoverflow exception.
class Foo
{
//static Foo foo = new Foo(); // you are not allowed using this approach
//static readonly Foo foo = new Foo(); // you are not allowed using this approach
Foo foo = new Foo();
}
class Program
{
static void Main(strin... |
Say i have a list (unorder):
Score = ['score1','score10','score6','score2','score22','score12']
Names = ['name1','name10','name6','name2','name22','name12']
email = ['email1','email10','email6','email2','email22','email12']
and then Score is sorted to be
ScoreSorted = ['score1','score2','score6','score10','score12','s... |
In the spirit of this xkcd
Write a program that plays regex golf with arbitrary pairs of lists. The program should at least attempt to make the regex short, a program that just outputs /^(item1|item2|item3|item4)$/ or similar is not allowed.
Scoring is based on the ability to generate the shortest regex. The test list... |
A lottery company wants to generate a random lottery ticket number of length 10 characters.
Write a code in any language to create such a number in which every digit comes only once for example 9354716208 in this number all integers from 0 to 9 comes only once. This number should be a random number.
The generated numb... |
What general tips do you have for golfing in Raku? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Raku (e.g. "remove comments" is not an answer). Please post one tip per answer.
|
Task
Write some code that will walk through the entire file-system tree and collect details from file-names, folder-names, text files etc to form a tag-group. This tag group, when searched in (user input) should point to the folders they are located in.
Rules
Any Language (standard libraries only).
Any kind of output ... |
Make program that takes the list from the files from STDIN, and aligns it nicely, just like ls command from coreutils. For example, assuming the following list (taken from The ASCII Collab, which takes place in the chatroom on this site).
alligator
ant
bear
bee
bird
camel
cat
cheetah
chicken
chimpanzee
cow
crocodile
de... |
Challenge: given a number, calculate how many unique, order-independent ways there are to achieve a score of that number in American Football.
Let's see how few characters can be used in each of your favorite languages! The usual rules apply. Input and output in a way that is natural to your language.
Recall that ... |
Imagine simple math problem. You have a number, say it's 1000. And you want to find the next multiple of 32 that follows 1000. You automatically make some simple calculations and get the result. Typical algorithm looks like this:
int number = 1000, result;
result = (1 + (number/32)) * 32; // integer division
It's kind... |
Write a code that will display the remainder of a division. Code with shortest byte wins.
Rules:
No arithmetic operation whatsoever should be in your code
No use of functions or methods
If you are using a function or method, it has to be written by you also
Samples:
Sample1: 9/3
Result1: 0
Sample2: 7/2
Result2: 1
... |
as some of you may know, n-queens problem is a set of algorithm puzzle that given a 'n x n' where n is the board size of a (let's say) chessboard, and the main goal is for the n queens (where n is the number of the queens) not be able to 'attack' one another in the board.
now I have a set of console code where user can... |
We've already got a meta-regex-golf problem as inspired by the xkcd comic
But, this regex golf looks fun, too! I want to distinguish between the states of the US and the regions of Italy. Why? I'm a citizen of both countries, and I always have trouble with this*.
The regions of Italy are
Abruzzo, Valle d'Aosta, Pug... |
Golfers.
Together, we have banded together to produce code that is concise, is functionally beautiful and is uglier then the Phantom of the Opera from the original novel.
The time has come for us to bring beauty back to the world of programming. With color. In a way that is concise, functionally beautiful is uglier the... |
Given two integers - n and r, your task is to calculate the combinatorial nCr.
nCr = n! / r! (n-r)!
The caveat is that you have to write code to do this calculation in minimum number of characters.
Input
The first line will be number of testcases T. Then T lines follow, each containing two positive integers - n an... |
Important edit: Earlier, there was an incorrect value in Example 1. It has been fixed.
You are given a two-dimensional array in which each cell contains one of four values.
Examples:
1 2 2 2 2 1 @ . . X X V
1 3 1 4 1 4 e . @ I C V
2 3 1 3 4 2 H H @ X I V
1 4 4 2 1 3 ... |
Write a quine that
Writes its source code to disk
Recursively executes the written source code
Produces some variation to the code the third time (so not a true Quine)
Stops recursively calling itself the fifth time
Bonus points for leaving nothing on disk after execution.
|
This question doesn't need to apply to just terminating decimals - repeating decimals can also be converted to fractions via an algorithm.
Your task is to make a program that takes a repeated decimal as input, and output the corresponding numerator and denominator (in lowest terms) that produces that decimal expansion.... |
Description
Here's a challenge with a somewhat practical use, at least for us golfers.
Your mission, should you choose to accept it, is to write a program that can take arbitrary binary data (either from stdin, or a file) and output some valid source code which provides access to the data. The generator and target lang... |
Given a list/array of names(String) sort them such that each name is followed by a name which starts with the last character of the previous name.
input
[
Luis
Hector
Selena
Emmanuel
Amish
]
output:
[
Emmanuel
Luis
Selena
Amish
Hector
]
|
You should get string of chemical equation (no spaces, only letters (upper-case and lower-case), numbers, brackets and math signs) from user and print the answer if equation is balanced or not (any pair of positive/negative answers: Yes/No, true/false, 1/0). To make code shorter you can assume that input strings can co... |
Inspired by the following XKCD comic:
In Missy Elliot's "Work It", part of the chorus goes as follows:
Is it worth it, let me work it
I put my thing down, flip it and reverse it
Bearing that in mind, I propose the following code golf challenge:
Create code that does, in order:
Takes 8-bit ASCII input from STDIN; e.g ... |
In as few characters of code as you can, create an algorithm which will pack the least number of rectangles necessary to completely fill a rasterized circle with integer radius r and return the parameters necessary to create each rectangle.
In the above image, the cyan portion is the "idealized" circle. The darkened c... |
Contest (!): In the language of your choice, write a program that will traverse the directory tree of a given directory and output a tree (i.e., an array of arrays) corresponding to it. Assume the directory is a predefined variable D. Smallest character count wins.
Rules:
You must use recursion
See Rules
Note: Assume... |
JSFuck is an esoteric language in which any Javascript statement can be accurately reproduced into another valid Javascript program that uses only the 6 characters []()!+.
The JSFuck converter, when given an input of alert("Hello World!"), produces a block of code that is 22,948 characters long. Because the program use... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.