noam.nta
BAN USER- 0of 0 votes
AnswersWe are speaking about a web page of Todo tasks.
- noam.nta in United States
I want the option to add task, edit task or delete task, and mark task as completed (or vice versa).
I also want the ability to filter the tasks by completion status (pending, completed, all).
Please accomplish one of the requirement using directive.
You should write this code in Java Angular| Report Duplicate | Flag | PURGE
Apple Jr. Software Engineer - 0of 0 votes
AnswersSimplify the implementation below as much as you can.
- noam.nta in United States
Even better if you can also improve performance as part of the simplification!
FYI: This code is over 35 lines and over 300 tokens, but it can be written in
5 lines and in less than 60 tokens.
קוד: בחר הכל
static int func(String s, char a, char b)
{
if (s.isEmpty()) return -1;
char[] strArray = string.toCharArray();
int i=0;
int aIndex=0;
int bIndex=0;
while (aIndex=0 && bIndex==0 && i<strArray.length)
{
if (strArray[i] == a)
aIndex=i;
if (strArray[i] == b)
bIndex=i;
i++;
}
if (aIndex != 0)
{
if (bIndex == 0)
return aIndex;
else
return Math.min(a, b);
}
else
{
if (bIndex != 0)
return bIndex;
else
return -1;
}
}| Report Duplicate | Flag | PURGE
Google Developer Program Engineer - 0of 0 votes
AnswersGiven 1 byte. Write a function that checks that it have exactly 3 bits which equal to 1.
- noam.nta in United States| Report Duplicate | Flag | PURGE
Google Developer Program Engineer
Thank you very much for so quickly answers!
- noam.nta April 13, 2015