Accenture Interview Question for Software Engineer in Tests


Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
0
of 0 vote

A trie of a has table will do the work.

To test, I am assuming the following function:
bool IsNounOrVerb(string word);

Test cases (black box):
Word = null
word is noun
word is verb
word is both verb and noun
word is neither verb nor noun
word is combination of special characters
word is a number string

Perform stress test for multi threading usage
Perform performance test since the system where the information about noun or verb could be slow
Perform various language test(I18N) if the function has that requirement

We can even explain other test strategies like acceptance testing, load testing, documentation check, static analysis for code improvements etc.

- Adi September 24, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

How about maintaining whitelists of all known nouns and verbs in two separate hash tables? Each time a word is read from the given book, query the hash tables to see if the given word is a noun or a verb.

- Murali Mohan July 09, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

i'll rather maintain two trie (1 for all known nouns and other for all known verbs) and then read character by character out of the book breaking at each space to check in the trie for a match

- The Artist July 09, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I'm not sure a trie is a good way to go since it helps you find prefixes and match them up. Some nouns are prefixes of verbs. So there's not much of a benefit using a trie there since you are not narrowing down the possibilities with it's use.

Instead a HashTable or a Dictionary of nouns and verbs would make the search faster.

- ann.mpaul July 14, 2013 | Flag
Comment hidden because of low score. Click to expand.
-2
of 2 vote

What does it mean "You may assume that the system already knows what are nouns and verbs" ? Do we have a function like isVerb(String word) or isNoun(String word)? If yes we can check words one by one and print them if at least one function return true. Can you explain the task in more detail?

- thelineofcode July 30, 2013 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More