Councyl Interview Question for Software Engineer Interns
- 0of 0 votes
Let's assume that we have a binary classification system that classifies sets of samples, the rules for the classification are:- camilito200009 November 07, 2017 in United States
The set is 'GOOD' if ALL the samples are 'GOOD'
The set is 'BAD' if ANY sample in the set is 'BAD'
Based on this we receive an input that contains multiple lines, where each line represents the classification of a set of samples. The format of each line is
where class will either be GOOD or BAD. The sample IDs represent the samples contained in the classified set.
Now, for generating the output response we have to consider three cases:
If a unique mapping of samples-to-class exists, we output the corresponding mapping (sorted by the samples IDs)
If no consistent sample-to-class is possible, we output the answer NO CONSISTENT
If more than one mapping would be consistent, we output the answer MULTIPLE MAPPING.
To better illustrate the problem, following there are 4 examples
If someone knows how to solve the problem, even if it's just pseudocode I'd really appreciate it
| Report Duplicate | Flag | PURGE
Councyl Software Engineer Intern
Interview Type: Phone Interview
Open Chat in New Window