摘要:
Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2. Note: 两个只含有数字的字符串相加。 解法: 对于每个字符转成对应的整数,然后相加,结果在写入 阅读全文
摘要:
Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and 阅读全文
摘要:
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the 阅读全文
摘要:
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文
摘要:
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each hou 阅读全文
摘要:
Note: This is an extension of House Robber. After robbing those houses on that street, the thief has found himself a new place for his thievery so tha 阅读全文
摘要:
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
摘要:
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文