发布时间:2015-03-22 16:50:28
import org.omg.CORBA.ARG_IN;//Given a positive integer, return its corresponding column title as appear in an Excel sheet.////For example://// 1 -> A// 2 -> B// 3 -> C// ...// 26 -> Z// 27 -> AA// &nb.........【阅读全文】
发布时间:2015-03-22 16:48:37
//A message containing letters from A-Z is being encoded to numbers using the following mapping:////'A' -> 1//'B' -> 2//...//'Z' -> 26//Given an encoded message containing digits, determine the total number of ways to decode it.////For example,//Given encoded message "12.........【阅读全文】
发布时间:2015-03-22 16:44:57
public class compareVersion {public static void main(String[] args) {// TODO 自动生成的方法存根}public int compareVersion(String version1, String version2) { int flag1[]=new int[version1.length()+1]; int flag2[]=new int[version2.length(.........【阅读全文】
发布时间:2015-03-22 16:20:14
class Change{int x;Change(int m){x=m;}}public class BalancedBinary {public static void main(String[] args) {// TODO 自动生成的方法存根TreeNode root=new TreeNode(3);//int i=3;Change change=new Change(0);System.out.print(isBalanced(root));} public static boolean isBalanced(TreeNode ro.........【阅读全文】
发布时间:2015-03-22 16:17:31
Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.public ListNode rotateRight(ListNode head, int k) { &n.........【阅读全文】