BrowserStack Interview Experience | Set 1 (On-Campus)
Last Updated :
02 Jan, 2016
Hi, BrowserStack recently visited our campus for written test for December placements. The written round was conducted on HackerEarth and was of 3 hours and had 2 coding questions.
1. Comment removal
Given a piece of code, the task was to remove all the comments from the code.
Eg. Input
int main(){
int i = 1;
cout<<i;
cout<<endl;
return 0;
}
|
Output:
int main(){
int i = 1;
cout<<i;
cout<<endl;
return 0;
}
|
PS : take special care of corner cases, how to deal with string properly.
2. JSON matching
Given two JSON objects, find the values of fields. whose values are different.
Eg. Input
{"Geeks":"Test1","Are":"hey","Cool":"yeah"}
{"Geeks":"Test1","Are":"20","Cool":['B','C']}
Output:
Are:Cool
PS : take special care of input and output format.
The questions were easy but the main task was to read the input correctly and string parsing related stuff.
Hope this will help you all.
Share your thoughts in the comments
Please Login to comment...