BrowserStack Interview Experience | Set 4 (On-Campus)
Online coding 3hrs
2 questions
20 marks each.
Problem 1:
Write a program which takes JSON as input and gives prettified JSON
a) You need to read JSON from STDIN. Input gives one line of uglified JSON.
b) Output should be formatted JSON.
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’] }
Ans: Are:Cool
Answer shud be in above format ..
Problem 2:
Given a string and a Regular Expression pattern, give the number of the times the pattern occurs in the string. RegEx symbols mean as follows:
. – 2 occurrences of the previous character, + – 4 occurrences of previous character, * – more than 5 occurrences of the previous character
Sample Input (Plaintext Link)
5
aaaaaannndnnnnnnfffhfhhgjjjwkkkllclc
a.
n+
a*
an.
a.d.
Sample Output (Plaintext Link)
5
3
2
1
0
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Recommended Posts:
- ServiceNow Interview Experience Oncampus
- MathWorks Interview Experience (EDG, Oncampus)
- UHG Interview Experience | OnCampus- 2019
- InfoEdge Interview Experience | OnCampus-2019
- BrowserStack Interview Experience | Set 5 (Fresher)
- BrowserStack Interview Experience | Set 1 (On-Campus)
- BrowserStack Interview Experience | Set 6 (On-Campus)
- BrowserStack Interview Experience | Set 3 (Coding Questions)
- BrowserStack Interview Experience | Set 2 (Coding Questions)
- BrowserStack (Mumbai) Interview Experience - Software Engineer
- BrowserStack Interview Experience - Senior Software Engineer
- BrowserStack Interview Experience | Set 7 (Online Coding Questions)
- [TopTalent.in] Interview with Manpreet Who Got Offers From Amazon, Hoppr, Browserstack, Reliance via TopTalent.in
- TIAA Interview Experience -Java Back Backend Developer (3+ years Experience)
- Goldman Sachs Interview Experience | Set 23 (2+ years Experience for Java Developer Role)

