Skip to content
Related Articles

Related Articles

Improve Article

BrowserStack Interview Experience | Set 3 (Coding Questions)

  • Last Updated : 02 Jan, 2016

Following is the written round questions for BrowserStack on campus.

Paper Duration: 2 hours
Number of Questions: 2
Maximum Marks: 2 * 20 = 40 marks

1. Sum all the digits of n!

Write a program that accepts a number n (in the range 1 to 2000) and outputs the sum of all the digits in the decimal representation of n!. For example: if n is 10, n! = 10! = 3628800. The output should be 27 in this case.

Sample Input: 9
Sample Output: 27

2. Regular Expression Match
Given a string and a regular expression pattern, give the number of times the pattern occurs in the string. RegEx example means as follows:
. – 2 occurrences of the previous character
+ – 4 occurrences of the previous character
* – more than 5 occurrences of the previous character

Sample Input:

Sample Output:

First Line: Number of sample test case (N)
Second Line: String
Next all will contain the RegEx.

The string will not contain the special characters that have already been mentioned. The pattern may contain parenthesis, in which case the special symbol has to apply on all the characters inside the parenthesis.

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, AmazonGoogle and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :