AMCAT DETAILS brings you a very latest amcat automata question for you to practice on. Get help, score well and stay tuned for more details.

Question:

Input: num1 and num2

such that 0 <= num1 <= 99999999

and 0 <= num2 <= 9

You have to find number of occurences of input num2 in input num1 and return it with function int isOccured(int num1, int num2).

Example:

Input: num1= 199294, num2= 0

Output: 3

Test Case 1:

Input:

1222212

2

Expected Output:

5

Test Case 2:

Input:

1001010

0

Expected Output:

4

**Note:- We are working on a new project totally dedicated to students in collaboration. So stay tuned and get benefit.**Question:

Input: num1 and num2

such that 0 <= num1 <= 99999999

and 0 <= num2 <= 9

You have to find number of occurences of input num2 in input num1 and return it with function int isOccured(int num1, int num2).

Example:

Input: num1= 199294, num2= 0

Output: 3

Test Case 1:

Input:

1222212

2

Expected Output:

5

Test Case 2:

Input:

1001010

0

Expected Output:

4

Thanks.... Please provide more automata questions.

ReplyDeleteyou are doing great work.

ReplyDelete