随笔分类 - 编程
摘要:2、Add Two Numbers https://leetcode.com/problems/add-two-numbers/ /** * Definition for singly-linked list. * public class ListNode { * int val; * ListN
阅读全文
摘要:1. Two Sum https://leetcode.com/problems/two-sum/ class Solution { public int[] twoSum(int[] nums, int target) { int[] res = new int[2]; HashMap<Integ
阅读全文
摘要:public class huiXingShu { public static void main(String[] args) { int vol = 10; int[][] arr = new int[vol][vol]; int x=0,y=0; int num = 1; while(arr[
阅读全文
摘要:编程实现杨辉三角 public class YangHuiTest { public static void main(String[] args) { int[][] yangHui = new int[10][]; for(int i = 0; i < yangHui.length;i++){
阅读全文