摘要:
题目描述: java /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } */ class 阅读全文
摘要:
题目描述: 方法一:java class Solution { public String replaceSpace(String s) { StringBuilder res = new StringBuilder(); for(Character c: s.toCharArray()){ if( 阅读全文
摘要:
解法一:O(MN)O(MN))Java版 class Solution { public void gameOfLife(int[][] board) { int [] neighbors = {0,1,-1}; int rows = board.length; int cols = board[0 阅读全文