摘要:
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega... 阅读全文
摘要:
Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文
摘要:
Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1 Integer.parseInt(v2[i])) { return 1; ... 阅读全文
摘要:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
摘要:
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".解题思路:直接思路,不需要拐弯。按位加,用flag 记住是否有进位,有是1,没有是0, 用St... 阅读全文
摘要:
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
摘要:
Given an array of integers, find out whether there are two distinct indicesiandjin the array such that the difference betweennums[i]andnums[j]is at mo... 阅读全文
摘要:
Given an array of integers and an integerk, find out whether there are two distinct indicesiandjin the array such thatnums[i] = nums[j]and the differe... 阅读全文
摘要:
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... 阅读全文