
牛客
名字被猪吃掉了
这个作者很懒,什么都没留下…
展开
-
牛客网 -- 计算机历年考研复试上机题 -- 手机键盘
题目描述按照手机键盘输入字母的方式,计算所花费的时间 如:a,b,c都在“1”键上,输入a只需要按一次,输入c需要连续按三次。 如果连续两个字符不在同一个按键上,则可直接按,如:ad需要按两下,kz需要按6下 如果连续两字符在同一个按键上,则两个按键之间需要等一段时间,如ac,在按了a之后,需要等一会儿才能按c。 现在假设每按一次需要花费一个时间段,等待时间需要花费两个时间段。 现在给出一串字...原创 2019-07-18 22:46:05 · 227 阅读 · 0 评论 -
牛客 -- leetcode -- evaluate-reverse-polish-notation
题目描述Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another expression.Some examples: ["2", "1", "+...原创 2019-07-29 11:35:52 · 120 阅读 · 0 评论 -
牛客 -- leetcode -- max-points-on-a-line
题目描述Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.我的想法:1、算法设计很简单的题目,但是真正用数据结构实现起来却不容易的一道题。2、刚开始考虑分三类进行解决,一类横坐标相同,一类纵坐标相同的点,一类斜率点3、考...原创 2019-07-29 21:01:55 · 132 阅读 · 0 评论