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

Version Path
trackler-2.2.1.109 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.108 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.107 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.106 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.105 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.104 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.103 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.102 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.101 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.100 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.99 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.98 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.97 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.96 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.95 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.94 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.93 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.92 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.91 tracks/elixir/exercises/transpose/transpose.exs
trackler-2.2.1.90 tracks/elixir/exercises/transpose/transpose.exs