Inquisitive
BAN USERDigitToPush = 9;
- Inquisitive March 06, 2014public static void main(String[] args)
{
int[] input = new int[]{ 0,5,6,0,0,2,4,0};
int nzpos = 0; //non-zero-position
int DigitToPush = 0;
for(int i = 0 ; i < input.length; i++)
{
if(arr[i] == DigitToPush)
continue;
else
input[nzpos++] = input[i];
}
// by this time all nonzero are at correct place; now fill-out rest of zeroes
for(int j = nzpoz; j < input.length() ; j++)
{
input[j] = DigitToPush;
}
}
pushing "0" is not the main part, this question can be asked to push any one number.
Ex: push all "9" at the end . Same code with DigitToPush = 5
This does seem a possible solution to me...Thanks
- Inquisitive March 06, 2014If i understand this question correctly, influncer can be find out easily using following strategy :
1. store "true" as value 1 and "false" as value 0;
2. find all the columns with total = N-1; each such column is one influencer .
step 2 can run in parallel for all columns and save result in shared space.
what do you mean by minimum soda volume ? can we have an example please ...
- Inquisitive January 26, 2013
Repsujijaa565, AT&T Customer service email at ABC TECH SUPPORT
My name is suji. I am working as a Suadela Investment in Tulsa USA . I identify and establish a new ...
Repallisonepollard, Applications Developer at Accenture
I am Allison from Germantown. I work as a Staff manager at The LawnGuru company. But my interest in blogging ...
- Inquisitive March 06, 2014