Sha256: fd59cb22c23675006335a0827892200e453c56d7cd10a946594838ee0ed22959
Contents?: true
Size: 525 Bytes
Versions: 69
Compression:
Stored size: 525 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
69 entries across 69 versions & 1 rubygems