发布时间:2015-10-04 12:28:51
<br /><br />public class MoveZeroes {<br /><br /><br />public static void main(String[] args) {<br />// TODO Auto-generated method stub<br /><br /><br />}<br />public void moveZeroes(int[] nums) {<br />int end=0;<br />int count=nums.length;<br />for(int i=0;i<count;i++){<br />if(num.........【阅读全文】
发布时间:2015-10-04 12:28:45
<br /><br />public class MoveZeroes {<br /><br /><br />public static void main(String[] args) {<br />// TODO Auto-generated method stub<br /><br /><br />}<br />public void moveZeroes(int[] nums) {<br />int end=0;<br />int count=nums.length;<br />for(int i=0;i<count;i++){<br />if(num.........【阅读全文】
发布时间:2015-10-04 12:27:53
public class NumberofDigitOne {<br /><br /><br />public static void main(String[] args) {<br />// TODO Auto-generated method stub<br /><br /><br />}<br />//总和等于前面位的和加上这一位的1的总和,还有如果这一位是1的话加上前面树的个数。<br />public int countDigitOne(int n) {<br /> &nbs.........【阅读全文】
发布时间:2015-09-26 15:20:24
//Validate Binary Search Tree My Submissions Question Solution <br />//Total Accepted: 63004 Total Submissions: 312589 Difficulty: Medium<br />//Given a binary tree, determine if it is a valid binary search tree (BST).<br />//<br />//Assume a BST is defined as follows:<br />//<br />//The .........【阅读全文】
发布时间:2015-09-26 15:19:31
//Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).<br />//<br />//For example, this binary tree is symmetric:<br />//<br />// 1<br />// / \<br />// 2 2<br />// / \ / \<br />//3 4 4 3<br />//But the fo.........【阅读全文】