## Recent Interview Questions

More Questions »- 0of 0 votes
Given 3 sorted arrays. Find(x,y,z), (where x is from 1st array, y is from 2nd array, and z is from 3rd array), such that x<y<z.

x = element(s) from array 1

y= element(s) from array 2

z = element(s) from array 3

I can have more than 1 elements from each array. But at least 1 from each array is mandatory and elements from .

Need to find the number of such sequences.

- 0of 0 votes
You are given a String S of length N. Now, a good subsequence is one that can be represented in the form (a raised to the power i) (b raised to the power j) (c raised to the power k) where i≥1, j≥1 and k≥1. For example ,if i=2, j=1, k=3, it represents the string aabccc. In short, a good subsequence is a subsequence that first consist of

i ′a′ characters, followed by j ′b′ characters, followed by k′c′ characters, where i≥1, j≥1 and k≥1

Now, you need to find the number of good subsequences of String S. As the number of such subsequences could be rather large, print the answer Modulo

(10 raised to the power 9) + 7.

Note: Two subsequences are considered different if the set of array indexes picked for the 2 subsequences are different.

Input : abcabc

Output : 7

Explanation

Valid sub sequences are(1-based indexing):

{1,2,3}

{1,2,6}

{1,5,6}

{4,5,6}

{1,2,5,6}

{1,4,5,6}

{1,2,3,6}

- 0of 0 votes
scenario: Many Ethernet switches are present, on which we want to run the test on. connection between several links to our traffic generator and various ports of the different switches is established.The physical ports we use may vary between the different switches.

Test: We need an easy way to reference port settings that apply to every switch, irrespective of the physical port to which the traffic generator is connected.

required to code in Java or python or tcl script.

asked in second round of cisco

- 0of 0 votes
Harry is trying to climb a pole. He climbs the pole in terms of hops. The height of the pole is k. Harry at a time can make a hop of:

1.) 1 unit

2.) n units

Find the minimum number of hops Harry would need to reach the top of the pole.

No constraints were mentioned by can be done in O(1) without any extra space.

- -1of 1 vote
How to solve google technical errors?