"The idea of prefix sum can be applied here to find a product prefix array and a product suffix array.
Create a prefix product array by calculating the cumulative product of all elements which appear before that particular element in the array.
Similarly, create a suffix array for all elements which appear later than particular element in the array.
Now, replace each element with the product of prefix and suffix products of adjacent elements. This will give you the answer."
Somdip S. - "The idea of prefix sum can be applied here to find a product prefix array and a product suffix array.
Create a prefix product array by calculating the cumulative product of all elements which appear before that particular element in the array.
Similarly, create a suffix array for all elements which appear later than particular element in the array.
Now, replace each element with the product of prefix and suffix products of adjacent elements. This will give you the answer."See full answer
"This is a Technical question. It tests your ability to understand high level technical concepts. Even though your job won't have any coding involved, you'll still need to understand these concepts. Being able to cover all these topics with clarity communicates confidence in your interviewer.
Unfortunately, there's no formula for technical questions, but some general tips are:
Use analogies when you can
Break your solution into clear, bite-size steps
Don't be afraid to use examples to b"
Exponent - "This is a Technical question. It tests your ability to understand high level technical concepts. Even though your job won't have any coding involved, you'll still need to understand these concepts. Being able to cover all these topics with clarity communicates confidence in your interviewer.
Unfortunately, there's no formula for technical questions, but some general tips are:
Use analogies when you can
Break your solution into clear, bite-size steps
Don't be afraid to use examples to b"See full answer
"static int findLongestRepeatingSubSeq(String str)
{
int n = str.length();
int dp = new intn+1;
for (int i=0; i<=n; i++)
for (int j=0; j<=n; j++)
dpi = 0;
for (int i=1; i<=n; i++)
{
for (int j=1; j<=n; j++)
{
if (str.charAt(i-1)== str.charAt(j-1) && i != j)
dpi =Â 1 + dpi-1;
else
dpi = Math.max(dpi, dpi-1);
}
}
`return"
Padmanaban M. - "static int findLongestRepeatingSubSeq(String str)
{
int n = str.length();
int dp = new intn+1;
for (int i=0; i<=n; i++)
for (int j=0; j<=n; j++)
dpi = 0;
for (int i=1; i<=n; i++)
{
for (int j=1; j<=n; j++)
{
if (str.charAt(i-1)== str.charAt(j-1) && i != j)
dpi =Â 1 + dpi-1;
else
dpi = Math.max(dpi, dpi-1);
}
}
`return"See full answer
"Sir Assalamu Alaikum. How are you? I am from this company. Our water is the best. Your store is running out of water. Our drinking is the most profitable. Ours is superior to all other waters."
Jx J. - "Sir Assalamu Alaikum. How are you? I am from this company. Our water is the best. Your store is running out of water. Our drinking is the most profitable. Ours is superior to all other waters."See full answer