BrowserStack visited our campus during the placement season of IITs.
Round 1: Online test
There were 2 programs mainly related to app dev which were to be coded in 3 hours.
1. Write a program which takes JSON as input and gives prettified JSON
2. C Comment parser.
Round 2: Online Test
There were 3 problems to be solved in 5 hours.
Problem 1:
Consider the following series:
A := 1
B := A*2 + 2
C := B*2 + 3 and so on...
Write a program that:
- outputs the number corresponding to a given letter;
- given a string of letters like 'GREP', computes the sum of the numbers corresponding to all the letters in the string (i.e., G + R + E + P), as given by the above series; and
- given a large number (that would fit into a standard 32-bit integer), finds the shortest string of letters corresponding to it.
$ tree . |-- README.md |-- closure | |-- currencySymbols.js | |-- datetimeSymbolsExt.js | |-- datetimesymbols.js | |-- numberSymbols.js | `-- pluralRules.js |-- e2e | |-- i18n-e2e.js | |-- localeTest_cs.html | |-- localeTest_de.html | |-- localeTest_en.html | |-- localeTest_es.html | |-- localeTest_sk.html | |-- localeTest_zh.html | `-- runner.html |-- generate.sh |-- run-tests.sh |-- spec | |-- closureI18nExtractorSpec.js | |-- converterSpec.js | |-- parserSpec.js | `-- utilSpec.js |-- src | |-- closureI18nExtractor.js | |-- closureSlurper.js | |-- converter.js | |-- parser.js | `-- util.js `-- update-closure.sh 4 directories, 26 filesAn optional second parameter supports filtering the tree with grep like filter, only matching nodes. Eg:
$ tree . src . `-- src |-- closureI18nExtractor.js |-- closureSlurper.js |-- converter.js |-- parser.js `-- util.jsIt should be possible to use arbitrary regex expression for filtering. Problem 3: In this program you have to consume Twitter.com’s REST API. Write a program that, given a hashtag H and a number N,
- fetches the N most recent images (no duplicates) associated with that hashtag
- and generates a web-page (an HTML file would do) which displays these images as a simple slideshow