Skip to content
Related Articles

Related Articles

BrowserStack Interview Experience | Set 4 (On-Campus)
  • Difficulty Level : Easy
  • Last Updated : 02 Jan, 2016

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”:”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)

Sample Output (Plaintext Link)

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :