Interview-Questions

所属分类:Leetcode/题库
开发工具:Ruby
文件大小:1KB
下载次数:0
上传日期:2012-05-02 16:24:01
上 传 者sh-1993
说明:  我要回去解决面试中的白板编程问题
(I m going to go back and solve those whiteboard programming questions from interviews)

文件列表:
add_array.rb (703, 2012-05-03)

This project is a compilation of solutions I've written for the programming challanges I've seen in interviews. Unless otherwise noted, all these solutions were written after the fact and don't count for anything. Additionally, none of my solutions were written with performance in mind (if you are asked this question in an interview, performance of your algorithm will certainly be the second thing they ask you). add_array.rb ============ Given an array of numbers, insert a `+` or `*` between each item in such a way that the result equals a given value. *Example* Given `[1, 2, 3]` and a desired value of `7` Possible results 1+2+3 = 6 1+2*3 = 7 1*2*3 = 6 1*2+3 = 5 The ouput `1+2*3` is our solution.

近期下载者

相关文件


收藏者