摘要: /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListNode next; * public ListNode(int x) { val = x; } * } 阅读全文
posted @ 2023-04-15 22:45 vba是最好的语言 阅读(10) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int NumIslands(char[][] grid) { if(grid == null || grid.Count() == 0) return 0; int rowCount = grid.Count(); int colCou 阅读全文
posted @ 2023-04-15 12:16 vba是最好的语言 阅读(6) 评论(0) 推荐(0) 编辑
摘要: int NthUglyNumber(int n) { if(n == 1) return 1; List<long> arr = new List<long>(); // 这里用list,它会自己扩容,用数组就需要自己操作这些了 arr.Add(1); int[] uglyArr = {2,3,5} 阅读全文
posted @ 2023-04-15 10:07 vba是最好的语言 阅读(10) 评论(0) 推荐(0) 编辑