classSolution{publicint[]printNumbers(int n){int[] data =newint[(int)Math.pow(10, n)-1];for(int i =0; i < data.length; i++) data[i]= i+1;return data;}}
18. 矩阵中的路径
/**
* Definition for singly-linked list.
* public class ListNode {
* int val;
* ListNode next;
* ListNode(int x) { val = x; }
* }
*/classSolution{public ListNode deleteNode(ListNode head,int val){if(head.val == val)return head.next;
ListNode pre = head, cur = head.next;while(cur != null && cur.val != val){
pre = cur;
cur = cur.next;}// 节点删除if(cur != null) pre.next = cur.next;return head;}}