chuang24@buffalo.edu
BAN USER
Comments (7)
Reputation 10
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
BTW, method 1 is pretty good!
- chuang24@buffalo.edu September 25, 2013Comment hidden because of low score. Click to expand.
1
of 1 vote
the complexity of Method 2 is O(n)? did u assume that searchHashTable could be done in constant time?
- chuang24@buffalo.edu September 25, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
I misunderstood the que. sorry~~~
- chuang24@buffalo.edu September 22, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
If the array is an array of ints, why don't we just sort the array and iterate through the sorted array. This is pretty simple cuz in the sorted array, the same ints should all be right next to each other. This takes O(n) time and almost no space.
- chuang24@buffalo.edu September 22, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
aha, genius!
- chuang24@buffalo.edu September 21, 2013Comment hidden because of low score. Click to expand.
-1
of 1 vote
public String insertChar(String str, String a){
String subStr1 = str.substring(0,4);
String subStr2 = str.substring(4);
String newString = subStr1 + a + subStr2;
return newString;
}
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
genius!
- chuang24@buffalo.edu September 27, 2013