This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def non_repeat(str) | |
| counts = Hash.new(0) | |
| str.each_char { |char| counts[char] += 1 } | |
| str.reverse.each_char do |char| | |
| return char if counts[char] == 1 | |
| end | |
| "" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <snippet> | |
| <content><![CDATA[ | |
| binding.pry | |
| ]]></content> | |
| <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
| <tabTrigger>bp</tabTrigger> | |
| <!-- Optional: Set a scope to limit where the snippet will trigger --> | |
| <scope>source.ruby, source.ruby.rails, source.text.haml</scope> | |
| <description>auto complete for binding.pry</description> | |
| </snippet> |
NewerOlder