Recently ION group came to our Campus for hiring for a full time role.
OA
2 DSA questions and 8 MCQs on CS fundamentals
Interview R1
I had read online that ION group asks OOPs, puzzles and some basic DSA questions in their interviews. That's not true.
On our campus, they asked puzzles and LLD questions and one DS related question.
My interview didn't ask me puzzles but had asked by my interview to rate myself on c++, and asked me what I understood about OOPs and why it is a better programming paradigm that others. How do we implement OOPs actually. I had mentioned the four pillars, so he asked me what polymorphism was, I told him what it means and the types, run-time and compile-time. He asked me to open a code editor and asked me to implement classes and show both in action. He also told me to not to like random classes like Class A, classB but rather model the classes based on some real world entities. I chose to model classes on vehicle and Car. I wrote the code but since I didn't have a lot of practice in writing code for OOPs related topics, my code had a lot of bugs, I fixed all the errors that compiler was showing. And my code finally worked for both compile time and run-time polymorphism. This would have taken about 20-25 mins. I had panicked a lit bit in between bcoz of the bugs and actually wrote "method overriding" when I was overloading a method instead. The interviewer then I asked me to write destructor for both the classes, which I wrote but since I was very nervous I called the the parent destructor in child class as well. I fixed that later.
#include "bits/stdc++.h"
using namespace std;
class vehicle{
public:
int licenseNo;
bool isNew;
vehicle(int l){
this->licenseNo = l;
}
virtual void setStatus(bool status){
this->isNew = status;
}
~vehicle(){
cout<<"calling destructor of vehicle"<<endl;
}
};
class Car : public vehicle{
public:
string color;
Car(int l, string c): vehicle(l){
this->color = c;
}
void setStatus(bool status){
this->isNew = status;
cout<<"overloading function";
}
~Car() {
cout<<"calling destructor on car"<<endl;
}
};
int main(){
Car c(234, "red");
c.setStatus(true);
// object car
vehicle* v = new Car(123, "red");
//at run time this check which type of object this is
v->setStatus(true);
delete v;
return 0;
} The interview then asked which Data structures I had studied. I told him vectors, sets, maps etc. He asked me I which Data structure would I use to implement a phone directory, I forgot that this is implemented using trie, instead said a map<int, string>, he told me the point of phone directory is to search via name, so my directory won't be useful. I couldn't answer. The interviewer concluded the interview
Idts I will get interview call for next round :(
Can anyone tell whether am I cooked or not???