zarron
BAN USER- -1of 1 vote
AnswersThere are 10,000 balls and may be 500 different colors of ball
- zarron in United States
Example: There are:
4 - red ball
5900 - Blue ball
3700 - Green ball
396 - mintcream ball
Or there may be 10,000 red balls.
Or all balls are has same range, i.e. 500 red, 500 blue, etc.
We don’t know the range of any ball and number of color balls, but the minimum is 1 color and maximum is 500 colors, and we have auxiliary array of size 500. how to arrange all same color ball together in minimum passes over balls? is it possible to do in less than two passes ??| Report Duplicate | Flag | PURGE
Google Computer Scientist Algorithm - -7of 7 votes
Answersi am working on project and we want to access ASCII value of string at some index But we don't want access chat at index and parse it to integer
- zarron in United States
Example:- char character = s.charAt(8);
int ASCII = (int) character;
is there any other way to do same without converting to char?? and what will be time complexity? is there any built in function in java ? i don't know how char store in memory please anyone can explain me ? and how to handle Unicode without converting to char ??
Thanks!!| Report Duplicate | Flag | PURGE
Google Computer Scientist Algorithm - -2of 6 votes
Answerswhat is time complexity of concatenating two int in java example :-
- zarron in United States
int a=18965;
int b=78521369741;
after concatenation i want ans in primitive integer data types like,
int c=1896578521369741;
i want to know what is the fastest way to do this and what will be the time complexity ?| Report Duplicate | Flag | PURGE
Google Computer Scientist Algorithm
sub-string what ?
- zarron December 11, 2014don't spoil this site