摘要:
本题不是很难,应用对撞指针就可以得到正确的答案。说下自己犯的一些错误吧, 1. int short = 0,结果编译后出现了Line 4: expected unqualified-id before '=' token的错误,当时我还是一脸懵逼,还以为是标点符号或者其他的错误。后来才想起来,sho 阅读全文
摘要:
在Leetcode上有两道题目是有关罗马数字的,一道是把罗马数字转换成阿拉伯数字,另一道是把阿拉伯数字转换成罗马数字。 具体来说是Leetcode 12题Integer to Roman和13题Roman to Integer。 具体的规则可见https://en.wikipedia.org/wik 阅读全文
摘要:
题目描述 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would ha 阅读全文