YouTube Turns Eight As Platform Surpasses More Than 100 Hours Of Video
Uploaded Per Minute
-
[image: youtube-logo]YouTube turns eight years old today, reminding each of
us in some odd way how young or old we really are. Remember, the company launche...
14 minutes ago
Count how many every symbol occurs in set, then output required amount of ones, twos, threes and fours?
ReplyDeleteno additional space man
ReplyDeleteI was thinking about this: start from left and right and swap (2,3) on left with (0,1) on the right. After one pass we will have (0,1)s on the left and (2,3)s on the right. Then repeat same thing on these sub-arrays (swapping 1-0s and 3-2s). However I would need two indices.
ReplyDelete