« first day (461 days earlier)      last day (618 days later) » 

1:04 AM
2
Q: Train Route Planning

user1502040We can model a rail network as a directed graph, where each node is a train station and each edge is a train connecting two train stations. We'll assume that each train leaves go between their stations at a regular schedule and takes a fixed amount of time Your code should take a list of trains, ...

14
Q: Find The Average String Between Two Strings

Seggan Inspired by this Your task today: given two strings, find the string with the lowest maximum Levenshtein distance to the input strings. For example, using Steffan and Seggan, the average string will be Steggan. It is distance 2 from Steffan (replace the gg with ff), and 1 from Seggan (add a t)....

-3
Q: Is there any way to re-arrange the shuffled image pixels?

Rehman AliI have shuffled the image pixels using the code: img = cv2.imread('car.jpg') np.random.shuffle(img) is there anyway to rearrange the pixels so that image gets back to its original form again? Is there any builtin function to make this thing easy to rearrange the pixels?

-3
Q: Cloudy day problem

MahaI was solving cloudyday problem on hackerrank: City has many towns. p is an array of population of n towns. x is an array of location of towns on 1 dimensional array (thus a numeric location). y is an array of location of clouds. r is an array of extent or breadth of clouds. Population in city u...

14
Q: Cryptic Multiplications

DomenicoGiven two non-negative integers e.g. 27, 96 their multiplication expression would be 27 x 96 = 2592. If now each digits is replaced with a symbol, such that two digits are replaced with the same symbol if and only if they are equal we could get something like AB x CD = AECA or 0Q x 17 = 0Z10 or !>

1
A: Sandbox for Proposed Challenges

bigyihsuanImplement String Projection Given two strings: a string s and an alphabet a, implement string projection in the shortest code possible. String projection returns a string o that contains the characters in s that are in a. The order of the characters in o must match the order of characters in s. S...

0
A: Sandbox for Proposed Challenges

Kevin CruijssenSolving an easy Sudoku in increasing order Tags: code-golfsudokunumbergridpuzzle-solver Introduction: I'm old-fashioned and still read a physical newspaper in the morning while eating my breakfast. Although I don't like Sudoku that much, I do solve the Light-complexity ones, which are extremely e...

1
A: Sandbox for Proposed Challenges

Wheat WizardMake a super fair number An even distribution number is a number such that if you select any of it's digits at random the probability of it being any particular value (e.g. 0 or 6) is the same, \$\frac1{10}\$. A precise definition is given later on. Here are a few examples: \$\frac{137174210}{1...

0
A: Sandbox for Proposed Challenges

AdamImplement Bloom filter insertion A Bloom filter is a probabilistic data structure that is used to determine whether an element is in a set in a fixed number of bits. It consists of: a bit array \$B\$ of fixed size \$m\$, initialized as all \$0\$s, and \$k\$ different hash functions \$h_1,\ldots,...

0
A: Sandbox for Proposed Challenges

AdamAll permutations of range from \$1\$ to \$n\$ code-golf Given a positive input \$n\$, output all permutations of either \$\{0,1,\ldots,n\}\$ or \$\{1,2,\ldots,n\}\$. Examples Outputting permutations of \$\{1,2,\ldots,n\}\$. Input Output 1 [(1)] 2 [(1, 2), (2, 1)] 4 [(1, 2, 3, 4), (1, ...

 
5 messages moved from The Nineteenth Byte
5 messages moved from The Nineteenth Byte
 

« first day (461 days earlier)      last day (618 days later) »