@@ -0,0 +1,1129 @@
+/**%0A * Definition for singly-linked list.%0A * public class ListNode %7B%0A *     int val;%0A *     ListNode next;%0A *     ListNode(int x) %7B val = x; next = null; %7D%0A * %7D%0A */%0A/**%0A * Definition for binary tree%0A * public class TreeNode %7B%0A *     int val;%0A *     TreeNode left;%0A *     TreeNode right;%0A *     TreeNode(int x) %7B val = x; %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    private ListNode curPos;%0A    %0A    public TreeNode sortedListToBST(ListNode head) %7B%0A        if (head == null) %7B%0A            return null;%0A        %7D%0A        this.curPos = head;  %0A        int len = 0;%0A        while(head != null) %7B%0A            len++;%0A            head = head.next;%0A        %7D%0A        return createBSTFromList(0, len-1);%0A    %7D%0A    %0A    private TreeNode createBSTFromList(int start, int end) %7B%0A        if (start %3E end) %7B%0A            return null;%0A        %7D%0A        int mid = (start+end)/2;%0A        %0A        TreeNode left = createBSTFromList(start, mid-1);%0A        TreeNode root = new TreeNode(curPos.val);%0A        this.curPos = this.curPos.next;%0A        root.left = left;%0A        root.right = createBSTFromList(mid+1, end);%0A        %0A        return root;%0A    %7D%0A%7D%0A

Create Convert_Sorted_List-to-binary-search-tree.java