tiandiao123
BAN USERpublic static boolean findAll(List<TreeNode> list){
if(list==null || list.size()<1){
return false;
}
Map<TreeNode,Integer> map = new HashMap<>();
for(TreeNode ele:list){
if(!map.containsKey(ele)){
map.put(ele,0);
}
if(ele.left!=null){
map.put(ele.left,map.getOrDefault(ele.left,0)+1);
}
if(ele.right!=null){
map.put(ele.right,map.getOrDefault(ele.right,0)+1);
}
}
TreeNode root = null;
for(TreeNode ele:list){
int val = map.get(ele);
if(val==0&&root!=null){
return false;
}else if(val==0 && root==null){
root=ele;
}else if(val>1){
return false;
}
}
preorderTree(root,map);
return map.size()==0;
}
public static void preorderTree(TreeNode root,Map<TreeNode,Integer> map){
if(root==null){
return;
}
preorderTree(root.left,map);
preorderTree(root.right,map);
map.remove(root);
}
what is output?
- tiandiao123 October 20, 2017public static String formatString(String str,int k){
StringBuilder sb = new StringBuilder();
char[] array = str.toCharArray();
int p = 0;
for(int i=0;i>array.length;i++){
if(array[i]=='-'){
continue;
}
sb.append(array[i]);
p++;
if(p==k){
sb.append("-");
p=0;
}
}
return sb.toString();
}
public static String unscrambleString(String[] dicts,String str){
StringBuilder sb = new StringBuilder();
Boolean[] check = new Boolean[str.length()];
Map<char[],Integer> map = new HashMap<>();
for(int i=0;i<dicts.length;i++){
String ele = dicts[i];
char[] array = ele.toCharArray();
Arrays.sort(array);
map.put(array,i);
}
if(unscrambleHelper(sb,dicts,map,check,str,0)){
return sb.toString().substring(0,sb.length()-1);
}
return "no such string";
}
public static boolean unscrambleHelper(StringBuilder sb,String[] dicts,Map<char[],Integer> map,Boolean[] check,
String str,int index){
if(index==str.length()){
return true;
}
if(check[index]!=null){
return check[index];
}
for(int i=index;i<str.length();i++){
String curStr = str.substring(index,i+1);
char[] curStrArray = curStr.toCharArray();
Arrays.sort(curStrArray);
for(char[] strEle:map.keySet()){
if(strEle.length==curStrArray.length){
if(checkEqual(strEle,curStrArray)){
String ele = dicts[map.get(strEle)];
sb.append(ele+" ");
if(unscrambleHelper(sb,dicts,map,check,str,i+1)){
check[index] = true;
return true;
}
sb.setLength(sb.length()-strEle.length-1);
}
}
}
}
check[index] = false;
return false;
}
public static boolean checkEqual(char[] array1,char[] array2){
if(array1.length!=array2.length){
return false;
}
for(int i=0;i<array1.length;i++){
if(array1[i]!=array2[i]){
return false;
}
}
return true;
}
This is a typical knapsack problem, here is my java implementation:
public static int maxSum(int[][] array,int m){
int[][] sums = new int[array.length][];
for(int i=0;i<array.length;i++){
sums[i] = new int[array[i].length];
int count = 0;
for(int j=array[i].length-1;j>=0;j--){
count+=array[i][j];
sums[i][j] = count;
}
}
int[][] dp = new int[array.length+1][m+1];
for(int i=1;i<=array.length;i++){
for(int j=1;j<=m;j++){
dp[i][j] = dp[i-1][j];
for(int k=array[i-1].length-1;k>=array[i-1].length-1-(j-1);k--){
int count = array[i-1].length-k;
dp[i][j] = Math.max(dp[i][j],dp[i][j-count]+sums[i-1][k]);
}
}
}
return dp[array.length][m];
}
public static int maxSum(int[][] array,int m){
int[][] sums = new int[array.length][];
for(int i=0;i<array.length;i++){
sums[i] = new int[array[i].length];
int count = 0;
for(int j=array[i].length-1;j>=0;j--){
count+=array[i][j];
sums[i][j] = count;
}
}
int[][] dp = new int[array.length+1][m+1];
for(int i=1;i<=array.length;i++){
for(int j=1;j<=m;j++){
dp[i][j] = dp[i-1][j];
for(int k=array[i-1].length-1;k>=array[i-1].length-1-(j-1);k--){
int count = array[i-1].length-k;
dp[i][j] = Math.max(dp[i][j],dp[i][j-count]+sums[i-1][k]);
}
}
}
return dp[array.length][m];
}
this is knacksack problem!
- tiandiao123 October 05, 2017I am confused that what do you mean optimal solution of this problem? Do you mean that we need to make sure the solution ends with largest amount of money(or largest strength)?
- tiandiao123 October 04, 2017Can you provide more details? what do you mean combinations of strings?
- tiandiao123 October 03, 2017It is a NP-hard problem, which is a famous problem called TSP problem. The main idea is that find all the @, and construct distance 2D array to represent the distance between different @s, and then use backtracking algorithm to get the final answer. If we just use dfs, and the time complexity is O(N!), but if we add DP algorithm, and then the time complexity if O(2^N)
- tiandiao123 September 30, 2017As for this question, I think we need to construct two treeset, one is minheap, another one is maxheap, and then use this data stricture to calculate median!
- tiandiao123 September 30, 2017public static TreeNode getTreeFromPreorder(int[] nums){
Deque<TreeNode> deque = new ArrayDeque<>();
if(nums==null || nums.length<1){
return null;
}
TreeNode root = new TreeNode(nums[0]);
deque.offer(root);
for(int i=1;i<nums.length;i++){
TreeNode node = new TreeNode(nums[i]);
TreeNode temp = null;
while(!deque.isEmpty()&&deque.peekLast().val<node.val){
temp = deque.pollLast();
}
if(temp!=null){
temp.right = node;
deque.offer(node);
}else{
deque.peekLast().left = node;
deque.offer(node);
}
}
return root;
}
static String longestStr = "";
public static String findLongestSubsequence(String[] dicts,String target){
TrieNode root = buildTrieTree(dicts);
char[] array = target.toCharArray();
Map<Character,TreeSet<Integer>> map = new HashMap<>();
for(int i=0;i<array.length;i++){
if(!map.containsKey(array[i])){
map.put(array[i],new TreeSet<>());
}
map.get(array[i]).add(i);
}
longestSubseqSearch(root,map,0);
return longestStr;
}
public static void longestSubseqSearch(TrieNode root,Map<Character,TreeSet<Integer>> map,
int pos){
if(root==null){
return;
}
if(root.str!=null){
if((root.str).length()>longestStr.length()){
longestStr = root.str;
}
}
for(int i=0;i<26;i++){
if(root.childs[i]==null){
continue;
}
char c = (char)(i+'a');
if(!map.containsKey(c)){
continue;
}
TreeSet<Integer> temp_set = map.get(c);
Integer index = temp_set.ceiling(pos);
if(index==null){
continue;
}else{
longestSubseqSearch(root.childs[i],map,index+1);
}
}
}
public static TrieNode buildTrieTree(String[] dicts){
TrieNode root = new TrieNode();
for(String str:dicts){
TrieNode current = root;
char[] array = str.toCharArray();
for(int i=0;i<array.length;i++){
char c = array[i];
if(current.childs[c-'a']==null){
current.childs[c-'a'] = new TrieNode();
}
current = current.childs[c-'a'];
}
current.str = str;
}
return root;
}
public static List<TreeNode> findDuplicateTree(TreeNode root){
List<TreeNode> res = new ArrayList<>();
findDuplicateTreeHelper(res,new HashSet<>(),root,new StringBuilder());
return res;
}
public static String findDuplicateTreeHelper(List<TreeNode> res,Set<String> set,TreeNode root,
StringBuilder stribuild){
if(root==null){
stribuild.append("()");
return "()";
}
String str = "(" + root.val;
str+=findDuplicateTreeHelper(res,set,root.left,stribuild);
str+=findDuplicateTreeHelper(res,set,root.right,stribuild);
str+=")";
if(!set.contains(str) && stribuild.indexOf(str)>=0){
res.add(root);
set.add(str);
}
stribuild.append(str);
return str;
}
I think this method should be right, basical idea is using TreeMap, and the time complexity is O(nLog(n)):
public static int minMerge(List<Interval> intervals,Interval target){
TreeMap<Integer,Integer> treemap = new TreeMap<>();
for(int i=0;i<intervals.size();i++){
Interval temp = intervals.get(i);
if(treemap.containsKey(temp.start)){
treemap.put(temp.start,Math.max(temp.end,treemap.get(temp.start)));
}else{
treemap.put(temp.start,temp.end);
}
}
int count = 0;
int cur_end = target.start;
while(treemap.size()!=0){
count++;
Integer next_start = treemap.floorKey(cur_end);
if(next_start==null){
return 0;
}
Integer next_end = treemap.get(next_start);
treemap.remove(next_start);
while(!treemap.isEmpty()){
next_start = treemap.floorKey(cur_end);
if(next_start==null){
break;
}
next_end = Math.max(next_end,treemap.get(next_start));
treemap.remove(next_start);
}
if(next_end>=target.end){
return count;
}
cur_end = next_end;
}
return 0;
}
share my java solution!
public static void printTreePath(TreeNode root){
List<int[]> path = new ArrayList<>();
printTreePathHelper(root,path,0,0);
}
public static void printTreePathHelper(TreeNode root,List<int[]> path,int pos,int left_most){
path.add(new int[]{root.val,pos});
if(root.left==null && root.right==null){
List<String> ans = new ArrayList<>();
for(int[] ele:path){
String temp = "";
int count = ele[1]-left_most;
for(int i=0;i<count;i++){
temp+="_";
}
temp+=ele[0];
ans.add(temp);
}
for(String str:ans){
System.out.println(str);
}
System.out.println();
}else{
if(root.left!=null){
printTreePathHelper(root.left,path,pos-1,Math.min(left_most,pos-1));
}
if(root.right!=null){
printTreePathHelper(root.right,path,pos+1,left_most);
}
}
path.remove(path.size()-1);
}
can you define what contiguous shape is? Thanks!
- tiandiao123 September 21, 2017I am wondering whether those rectangles will be overlapping?
- tiandiao123 September 15, 2017it should use suffix array or suffix tree to solve the problem.
- tiandiao123 September 13, 2017reference Python thoughts from @americano
import java.util.*;
import java.lang.*;
public class LargestDivisableBy3 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] nums = new int[]{4,5,2,4,1,1,1,8};
System.out.println(getLargestDivisableBy3(nums));
}
public static int getLargestDivisableBy3(int[] digits){
Arrays.sort(digits);
reverse(digits);
Map<Integer,Integer> map = new HashMap<>();
map.put(0,0);
for(int i=0;i<digits.length;i++){
Map<Integer,Integer> tempMap = new HashMap<>(map);
for(int key:map.keySet()){
int value = map.get(key);
int temp = value*10+digits[i];
int r = temp%3;
if(!tempMap.containsKey(r)){
tempMap.put(r,temp);
}else if(tempMap.get(r)<temp){
tempMap.put(r,temp);
}
}
map = tempMap;
}
return map.get(0);
}
public static void reverse(int[] array){
int i=0;
int j=array.length-1;
while(i<j){
int t = array[i];
array[i] = array[j];
array[j] = t;
i++;
j--;
}
}
}
Since based on this question's description, the author only lets us to confirm whether they can form a binary tree, so we only need to check whether it only has a single tree, so we can use Union Found algorithm to solve the question.
- tiandiao123 September 08, 2017I feel this question can be solved using Union Found
- tiandiao123 September 08, 2017public static void main (String[] args) throws java.lang.Exception
{
String str = "C6H6(CH2H)6(NO2)3";
Map<Character,Integer> map = new HashMap<>();
map = createChemicalMap(str);
for(Character c : map.keySet()){
System.out.println(c+" : " + map.get(c));
}
}
public static Map<Character,Integer> createChemicalMap(String str){
Map<Character,Integer> map = new HashMap<>();
if(str == null || str.length()<1){
return map;
}
char[] array= str.toCharArray();
Deque<Map<Character,Integer>> deque = new ArrayDeque<>();
int num = 0;
for(int i=0;i<array.length;i++){
if(Character.isDigit(array[i])){
char pre_c = array[i-1];
num = array[i] - '0';
while(i+1<array.length && Character.isDigit(array[i+1])){
num = num*10 + array[i+1]-'0';
i++;
}
if(pre_c!=')'){
map.put(pre_c,map.get(pre_c)+num-1);
}else{
for(char c : map.keySet()){
map.put(c,map.get(c)*num);
}
if(!deque.isEmpty()){
Map<Character,Integer> pre_map = deque.pollLast();
for(Character c : map.keySet()){
pre_map.put(c,pre_map.getOrDefault(c,0)+map.get(c));
}
map = pre_map;
}
}
}else if(array[i] == '('){
deque.offer(map);
map = new HashMap<>();
}else if(array[i]!=')'){
map.put(array[i],1+map.getOrDefault(array[i],0));
}
}
return map;
}
change @Dhruva.Bharadwaj's codes to makes sure it is correct!
private static boolean IsMetaString(String string1, String string2) {
String s1 = string1.toLowerCase();
String s2 = string2.toLowerCase();
int diff = 0;
int diffIndex = 0;
if (s1.length() != s2.length() || s1.length() == 0) {
return false;
}
for (int i = 0; i < s1.length(); i++) {
if (s1.charAt(i) == s2.charAt(i)) {
continue;
}
diff++;
if (diff > 2) {
return false;
} else if (diff == 1) {
diffIndex = i;
}else{
if (s2.charAt(i) == s1.charAt(diffIndex) && s2.charAt(diffIndex)==s1.charAt(i)) {
continue;
}else{
return false;
}
}
}
return diff==2;
}
share my java codes
public static List<List<Integer>> findLongestPath(TreeNode root){
List<List<Integer>> res = new ArrayList<>();
if(root==null){
return res;
}
helperFindPath(root,res);
return res;
}
public static List<List<Integer>> helperFindPath(TreeNode root,List<List<Integer>> res){
List<List<Integer>> ans = new ArrayList<>();
if(root==null){
List<Integer> list = new ArrayList<>();
ans.add(list);
return ans;
}
if(root.left==null && root.right==null){
List<Integer> temp = new ArrayList<>();
temp.add(root.val);
ans.add(temp);
return ans;
}
List<List<Integer>> left_list = helperFindPath(root.left,res);
List<List<Integer>> right_list = helperFindPath(root.right,res);
for(List<Integer> left:left_list){
for(List<Integer> right:right_list){
List<Integer> temp = new ArrayList<>();
temp.addAll(left);
temp.add(root.val);
temp.addAll(right);
if(res.size()!=0 && res.get(0).size()<temp.size()){
res.clear();
res.add(temp);
}else if(res.size()==0 || res.get(0).size()==temp.size()){
res.add(temp);
}
if(left.size()>right.size()){
List<Integer> list = new ArrayList<>();
list.add(root.val);
list.addAll(left);
ans.add(list);
}else if(left.size()<right.size()){
List<Integer> list = new ArrayList<>();
list.add(root.val);
list.addAll(right);
ans.add(list);
}else{
List<Integer> list1 = new ArrayList<>();
List<Integer> list2 = new ArrayList<>();
list1.add(root.val);
list1.addAll(left);
list2.add(root.val);
list2.addAll(right);
ans.add(list1);
ans.add(list2);
}
}
}
return ans;
}
I am wondering whether the subarray should be consecutive or not consecutive?
- tiandiao123 September 07, 2017Is it assumed that the array should be increasing?
- tiandiao123 September 07, 2017static int mixDif = Integer.MIN_VALUE;
public static int maxDifNodes(TreeNode root,TreeNode node){
if(root==node){
return 0;
}
inorder(root,node);
return maxDif;
}
public static TreeNode inorder(TreeNode root,TreeNode node){
if(root==null){
return null;
}
if(root==node){
maxDif = Math.max(maxDif,Math.abs(root.val-node.val));
return node;
}
TreeNode left = inorder(root.left,node);
TreeNode right = inorder(root.right,node);
if(left==null&&right==null){
return null;
}else{
maxDif = Math.max(maxDif,Math.abs(root.val-node.val));
return node;
}
}
// package whatever; // don't place package name!
import java.io.*;
import java.lang.*;
import java.util.*;
class myCode
{
public static void main (String[] args) throws java.lang.Exception
{
System.out.println(findnumOfDigit(28,2));
}
public static int findnumOfDigit(int num,int target_digit){
int current = num;
int divide = 1;
int res = 0;
while(current!=0){
int r = current%10;
if(r>target_digit){
res += (current/10+1)*divide;
}else if(r==target_digit){
res += (current/10)*divide+num%divide+1;
}else{
res += (current/10)*divide;
}
divide *= 10;
current /= 10;
}
return res;
}
}
O(log(N)) Time complexity solution:
public static void insertNodeToTree(TreeNode root,int val){
TreeNode node = new TreeNode(val);
if(root==null){
return;
}else if(root.left==null){
root.left=node;
return;
}else if(root.right==null){
root.right=node;
return;
}
int left_rHeight = rightMostHeight(root.left);
int right_rHeight = rightMostHeight(root.right);
if(left_rHeight==right_rHeight){
insertNodeToTree(root.left,val);
}else{
insertNodeToTree(root.right,val);
}
}
public static int rightMostHeight(TreeNode root){
if(root==null){
return 0;
}
return 1+rightMostHeight(root.right);
}
O(N) time complexity
public static void insertNodeToTree(TreeNode root,int val){
TreeNode node = new TreeNode(val);
if(root==null){
return;
}else if(root.left==null){
root.left=node;
return;
}else if(root.right==null){
root.right=node;
return;
}
int left_rHeight = rightMostHeight(root.left);
int right_rHeight = rightMostHeight(root.right);
if(left_rHeight==right_rHeight){
insertNodeToTree(root.left,val);
}else{
insertNodeToTree(root.right,val);
}
}
public static int rightMostHeight(TreeNode root){
if(root==null){
return 0;
}
return 1+rightMostHeight(root.right);
}
public static void main (String[] args) throws java.lang.Exception
{
//String str = "C6H6((CH2)6(NO2)3)4";
String str = "C6H6(CH2)6(NO2)3";
Map<Character,Integer> map = new HashMap<>();
map = createChemicalMap(str);
for(Character c : map.keySet()){
System.out.println(c+" : " + map.get(c));
}
}
public static Map<Character,Integer> createChemicalMap(String str){
Map<Character,Integer> map = new HashMap<>();
if(str == null || str.length()<1){
return map;
}
char[] array= str.toCharArray();
Deque<Map<Character,Integer>> deque = new ArrayDeque<>();
int num = 0;
for(int i=0;i<array.length;i++){
if(Character.isDigit(array[i])){
char pre_c = array[i-1];
num = array[i] - '0';
while(i+1<array.length && Character.isDigit(array[i+1])){
num = num*10 + array[i+1]-'0';
i++;
}
if(pre_c!=')'){
map.put(pre_c,map.get(pre_c)*num);
}else{
for(char c : map.keySet()){
map.put(c,map.get(c)*num);
}
if(!deque.isEmpty()){
Map<Character,Integer> pre_map = deque.pollLast();
for(Character c : map.keySet()){
pre_map.put(c,pre_map.getOrDefault(c,0)+map.get(c));
}
map = pre_map;
}
}
}else if(array[i] == '('){
deque.offer(map);
map = new HashMap<>();
}else if(array[i]!=')'){
if(!map.containsKey(array[i])){
map.put(array[i],1);
}
}
}
return map;
}
public static float findMedianOfTree(TreeNode root){
int count = findnumOfNodes(root);
if(count == 1){
return root.val;
}
if(count%2==1){
return findkthEleTree(root,count/2+1);
}else{
return (findkthEleTree(root,count/2)+findkthEleTree(root,count/2+1))/(float)2;
}
}
public static int findkthEleTree(TreeNode root,int k){
int left_count = findnumOfNodes(root.left);
if(left_count+1==k){
return root.val;
}else if(left_count+1<k){
return findkthEleTree(root.right,k-left_count-1);
}else{
return findkthEleTree(root.left,k);
}
}
public static int findnumOfNodes(TreeNode root){
if(root==null) return 0;
return findnumOfNodes(root.left)+1+findnumOfNodes(root.right);
}
This question is a little complicate, isn't? Someone has some idea?
- tiandiao123 August 30, 2017public static void main (String[] args) throws java.lang.Exception
{
System.out.println(whoWin(2,3,5));
}
public static int whoWin(int k,int l,int n){
if(n==1){
return 1;
}
Boolean[] used = new Boolean[n];
if(canWin(used,0,k,l)){
return 1;
}
return 2;
}
public static boolean canWin(Boolean[] used,int start,int k,int l){
if(start==used.length){
return false;
}
if(used[start]!=null){
return used[start];
}
if(start+1 == used.length || start+k == used.length || start+l == used.length){
return true;
}
int[] nums = new int[]{1,k,l};
for(int ele:nums){
if(ele+start<=used.length){
if(!canWin(used,ele+start,k,l)){
used[start] = true;
return true;
}
}
}
used[start] = false;
return false;
}
share my O(n) solution:
public static int[] replaceNextHigher(int[] nums){
if(nums == null || nums.length<=1){
return nums;
}
Deque<Integer> deque = new ArrayDeque<>();
int[] array = new int[nums.length];
for(int i = nums.length-1;i>=0;i--){
if(i==nums.length-1){
array[i]=nums[i];
deque.offer(nums[i]);
}else{
while(!deque.isEmpty()&&nums[i]>=deque.peekFirst()){
deque.pollFirst();
}
if(deque.isEmpty()){
array[i] = nums[i];
}else{
array[i]=deque.peekFirst();
}
deque.offerFirst(nums[i]);
}
}
return array;
}
can you provide more details about this question? Like what does the equal probability means?
- tiandiao123 August 30, 2017// package whatever; // don't place package name!
import java.io.*;
import java.util.*;
import java.lang.*;
class myCode
{
static class TreeNode{
int val;
TreeNode left,right;
TreeNode(int val){
this.val = val;
}
}
public static void main (String[] args) throws java.lang.Exception
{
TreeNode root = new TreeNode(0);
root.left = new TreeNode(1);
root.right = new TreeNode(2);
TreeNode node1 = new TreeNode(3);
root.left.right=node1;
root.right.left = new TreeNode(4);
TreeNode node2 = new TreeNode(5);
root.right.left.left = node2;
System.out.println(numRouteChange(node1,node2,root));
}
public static int numRouteChange(TreeNode node1,TreeNode node2,TreeNode root){
TreeNode parent= findParent(node1,node2,root);
int num1 = numRouteChangeHelper(parent,node1,null,0);
int num2 = numRouteChangeHelper(parent,node2,null,0);
return num1+num2+1;
}
public static int numRouteChangeHelper(TreeNode parent,TreeNode node,String pre_dir,int change){
if(parent == null){
return -1;
}
if(parent==node){
return change;
}
int count = -1;
if(pre_dir == null || pre_dir.equals("left")){
count = numRouteChangeHelper(parent.left,node,"left",change);
}else if(pre_dir.equals("right")){
count = numRouteChangeHelper(parent.left,node,"left",change+1);
}
if(count>=0){
return count;
}
if(pre_dir == null || pre_dir.equals("right")){
count = numRouteChangeHelper(parent.right,node,"right",change);
}else if(pre_dir.equals("left")){
count = numRouteChangeHelper(parent.right,node,"right",change+1);
}
return count;
}
public static TreeNode findParent(TreeNode node1,TreeNode node2,TreeNode root){
if(root == null){
return null;
}
if(root==node1 || root==node2){
return root==node1?node1:node2;
}
TreeNode left = findParent(node1,node2,root.left);
TreeNode right = findParent(node1,node2,root.right);
if(left!=null && right!=null){
return root;
}
return left==null?right:left;
}
}
public static N_ary_tree findCommonAncestor(N_ary_tree root,
N_ary_tree node1,N_ary_tree node2){
if(root == null){
return root;
}
if(root==node1 || root==node2){
return root;
}
N_ary_tree res = null;
int count = 0;
for(N_ary_tree ele : root.children){
N_ary_tree temp = findCommonAncestor(ele,node1,node2);
if(temp!=null){
res=temp;
count++;
}
}
if(count>=2){
return root;
}
return res;
}
public static int SearchRange(int[] array,int key,int K){
//List<Integer> list = new ArrayList<>();
if(K>=array.length){
return 0;
}
int index = Arrays.binarySearch(array,key);
if(index<0){
index = -(index+1);
}
int left=index-1;
int right=index;
int count=0;
while(count<K){
Integer left_value=left>=0?array[left]:null;
Integer right_value=right<array.length?array[right]:null;
if(left_value==null){
right++;
}else if(right_value==null){
left--;
}else if(Math.abs(key-left_value)<Math.abs(key-right_value)){
left--;
}else{
right++;
}
count++;
}
return left+1;
}
RepMiraDavis, Computer Scientist at Accenture
I am School librarian and also teach students the fundamentals of using a library and its resources .I write and ...
RepSpent 2001-2004 selling UFOs for the government. Have some experience with Internet Marketing Services New York. Set new standards for ...
- tiandiao123 October 26, 2017