This was originally a question from interviewstreet.com over a decade ago You are given an array (or whatever - your choice of input) of positive integers \$y_1,\ldots,y_n\$ that represents \$n\$ line segments, where segment \$i\$ has endpoints \$(i, 0)\$ and \$(i, y_i)\$. Imagine that from the top of each segment a horizontal ray is shot to the left, and this ray stops when it touches another segment or it hits the \$y\$-axis. Construct an array of \$n\$ integers, \$v_1,\ldots,v_n\$, where \...| Recent Questions - Code Golf Stack Exchange
The electronic version of the latest issue of the Girls’ Angle Bulletin is now available on our website. Can you figure out why the cover image is entitled Complete Domination? We open with the conclusion of our four-part interview with … Continue reading →| Girls' Angle