Ash
BAN USER
Questions (2)
Comments (2)
Reputation 180
- 4of 4 votes
AnswersImplement a method called printNonComments() which prints out a extract of text with comments removed.
- Ash in UK
For example, the input:
hello /* this is a
multi line comment */ all
Should produce:
hello
all
You have access to a method called getNextLine() which returns the next line in the input string.| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a 2D array of 1's and 0's, find the size of the largest block of 0's. For example the following 2D array:
int[][] array = { {1, 0, 1, 0, 0, 0, 1, 0 } {1, 0, 0, 0, 0, 0, 1, 1 } {1, 1, 1, 0, 0, 0, 1, 1 } }
Would return "9", because there is a 3x3 square of 0's, and that is the biggest block of 0's in the 2D space.
- Ash in United States| Report Duplicate | Flag | PURGE
Algorithm Arrays
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
synchronized version of hashmap that does not allow null keys or values
- Ash April 25, 2012