Skip to content

Instantly share code, notes, and snippets.

@adamloo85
Created November 14, 2013 06:56
Show Gist options
  • Save adamloo85/7462583 to your computer and use it in GitHub Desktop.
Save adamloo85/7462583 to your computer and use it in GitHub Desktop.

Revisions

  1. adamloo85 created this gist Nov 14, 2013.
    5 changes: 5 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    def find_char(string)
    word = string.split(//)
    word = word.find_all { |x| word.count(x) == 1 }
    word.first
    end