1. Two Sum 2019-09-16 leetcode Ruby 1. Two Sum1234567891011# @param {Integer[]} nums# @param {Integer} target# @return {Integer[]}def two_sum(nums, target) value = Array.new nums.each_with_index do|num,index| return [value.index(num),index] if value.include?(num) value<<target-num end []end