Brainteasers (Page 2/3)

Assign a list of processes to a variable and output it to the console

Hello everyone! The Brain Teaser series continues. First, we need to announce the winner of the previous brain teaser. We…

Read More

Convert a string to a character array

Hello everyone! We are back with a series of Brain Teasers. In the next 3 weeks we will publish one…

Read More

Find an unused drive letter

Your task is to write the shortest code to find one of the unused drive letters (excluding a,b and c)….

Read More

Enum’s numeric values

Without any loop statements or pipelines, get the numeric values of an Enum (such as IO.FileAttributes) in 1 statement.

Read More

Private variable

Attain the value of a private variable declared in a child scope from that scope’s own child scope.

Read More

Format elements

Given an Array of at least 2 elements, return a new Array of formatted elements without using array indices, pipelines or loop statements.

Read More