chochim
BAN USER- 1of 1 vote
AnswersGiven a list of integer numbers, a list of symbols [+,-,*,/] and a target number N, provide an expression which evaluates to N or return False if that is not possible.
- chochim in India
e.g. let the list of numbers be [1,5,5] and the target number is 9, one possible solution could be 5+5-1.| Report Duplicate | Flag | PURGE
Facebook Algorithm - 0of 0 votes
AnswersYou have a matrix containing integers (no range provided). The matrix is randomly populated with integers. We need to devise an algorithm where by we find a row number which matches exactly with a column within the matrix. We need to return the row number and the column number for the match. The order of of the matching elements is the same. For example, If, i'th row matches with j'th column, and i'th row contains the elements - [1,4,5,6,3]. Then jth column would also contain the elements - [1,4,5,6,3]. Given an n x n matrix.
- chochim| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm
Thanx @chennavarri. The solution presented seems an acceptable one - the key being converting the row/column into a string.
- chochim November 07, 2010