
LeetCode
菜鸟刷算法
_Carpediem
是你自己选择养老的
展开
-
Leetcode第一题:两数之和
题目描述:编写在线编写代码——Java:class Solution { public int[] twoSum(int[] nums, int target) { for(int i=0;i<nums.length;i++){ for (int j=i+1;j<nums.length;j++){ if(nums[i]...原创 2020-02-05 13:21:51 · 143 阅读 · 0 评论 -
Leetcode_回文数
题目描述:在线(leetcode官网)代码编写:class Solution { public boolean isPalindrome(int x) { int pal=0; int n=x; boolean flag=false; while(x>0){ pal=pal*10+x...原创 2020-02-06 22:11:50 · 190 阅读 · 0 评论