Candidatei-me por meio de uma agência de recrutamento. O processo levou 1 semana. Fui entrevistado pela Intuit em jan. de 2018
Entrevista
Applied through KForce for a contractual position.Interview was done by Developmental manager and an Engineer. They were looking for very strong Java,RDBMS and AWS Skills as the project I was moving to was more on Data Analytics and Data migration.
Perguntas de entrevista [3]
Pergunta 1
1) Asked to write my own rest services with Spring boot and was asked to write a JUnit for that.
2) Write "group by" operation in Java.
Assume there is a CSV file called "emp_dept.txt"
The file has two columns "employee_id" and "dept_id" separated by comma
Write equivalent of following query
select dept_id, count(*)
from table1
where dept_id != 3
group by dept_id
having count(*) > 50
order by count(*) desc
First was asked to explain about the query and then implement it in Java without any ORM/JPA
2) Consider the program below
a) public class ProgramGenerator {
public static class Expression {
private int lhs;
public int getLhs() {return lhs;}
public int setLhs(int lhs) {this.lhs = lhs;}
private int rhs;
public int getRhs() {return rhs;}
public int setRhs(int rhs) {this.rhs = rhs;}
private String operator;
public String getOperator() {return operator;}
public String setOperator(String operator) {this.operator = operator;}
}
public static void generateProgram(ProgramGenerator.Expression expression) {
System.out.println("public class ConstructedProgram {");
System.out.println("public static void main(String[] args) {");
System.out.print("System.out.println(");
System.out.print(expression.getLhs());
System.out.print(expression.getLhs()==7?"-":expression.getOperator());
System.out.print(expression.getLhs()==7?expression.getRhs()*2 :expression.getRhs());
System.out.println(");");
System.out.println("}\n}");
}
...
}
What is the output of the following code snippet:
ProgramGenerator.Expression expression = new ProgramGenerator.Expression();
expression.setLhs(7);
expression.setRhs(5);
expression.setOperator("+");
ProgramGenerator.generateProgram(expression)
b )Modify the class ProgramGenerator so that if LHS is 7, then the expression is changed in such a manner that the operator is inverted (i.e., + becomes - and -
becomes +) and the RHS is multiplied by two. So, in the above example; the output of ConstructedProgram will be -3.