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

Version Path
trackler-2.2.1.180 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.179 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.178 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.177 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.176 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.175 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.174 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.173 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.172 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.171 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.170 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.169 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.167 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.166 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.165 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.164 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.163 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.162 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.161 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.160 tracks/elixir/exercises/transpose/transpose.exs