摘要:
import java.util.*; public class Solution { public String LeftRotateString(String str,int n) { if(str.length() list = new ArrayList(); for(int i=0; i 0){ char ch = li... 阅读全文
摘要:
import java.util.*; public class Solution { public ArrayList > FindContinuousSequence(int sum) { if(sum > list = new ArrayList>(); for(int i = 1; i subList = new ArrayList(); ... 阅读全文
摘要:
public static boolean IsBalanced_Solution(TreeNode root) { if(root == null){ return true; } int left = iterTree(root.left); int right = iterTree(root.rig... 阅读全文
摘要:
//递归方式 public int TreeDepth(TreeNode root) { if(root == null){ return 0; } TreeNode node = root; int left = TreeDepth(node.left); int right = TreeDepth... 阅读全文
摘要:
import java.util.HashMap; import java.util.Map; public class Solution { public int GetNumberOfK(int [] array , int k) { Map map = new HashMap(); if(array.length==0){ re... 阅读全文