2014年12月16日

Evaluate Reverse Polish Notation (STRING-TYPE CONVERTION)

摘要: QuestionEvaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or an... 阅读全文

posted @ 2014-12-16 23:09 joannae 阅读(163) 评论(0) 推荐(0) 编辑

Max Points on a Line (HASH TABLE

摘要: QUESTIONGiven n points on a 2D plane, find the maximum number of points that lie on the same straight line.1ST TRY/** * Definition for a point. * stru... 阅读全文

posted @ 2014-12-16 22:40 joannae 阅读(189) 评论(0) 推荐(0) 编辑

Maximum Gap (ARRAY - SORT)

摘要: QUESTIONGiven an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.R... 阅读全文

posted @ 2014-12-16 06:42 joannae 阅读(319) 评论(0) 推荐(0) 编辑

导航