Sha256: 5a54f5f1eb34fcd128ba194729ab33b962314ece0f1c49327481d0732012b026
Contents?: true
Size: 521 Bytes
Versions: 63
Compression:
Stored size: 521 Bytes
Contents
defmodule Transpose do @doc """ Given an input text, output it transposed. Rows become columns and columns become rows. See https://en.wikipedia.org/wiki/Transpose. If the input has rows of different lengths, this is to be solved as follows: * Pad to the left with spaces. * Don't pad to the right. ## Examples iex> Transpose.transpose("ABC\nDE") "AD\nBE\nC" iex> Transpose.transpose("AB\nDEF") "AD\nBE\n F" """ @spec transpose(String.t) :: String.t def transpose(input) do end end
Version data entries
63 entries across 63 versions & 1 rubygems