随笔分类 -  编程

摘要:2、Add Two Numbers https://leetcode.com/problems/add-two-numbers/ /** * Definition for singly-linked list. * public class ListNode { * int val; * ListN 阅读全文
posted @ 2021-09-07 19:52 Clancy_gang 阅读(32) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-09-06 17:26 Clancy_gang 阅读(33) 评论(0) 推荐(0)
摘要: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[ 阅读全文
posted @ 2021-09-05 19:01 Clancy_gang 阅读(109) 评论(0) 推荐(0)
摘要:编程实现杨辉三角 public class YangHuiTest { public static void main(String[] args) { int[][] yangHui = new int[10][]; for(int i = 0; i < yangHui.length;i++){ 阅读全文
posted @ 2021-09-05 18:33 Clancy_gang 阅读(155) 评论(0) 推荐(0)