"function isPalindrome(s, start, end) {
while (s[start] === s[end] && end >= start) {
start++;
end--;
}
return end <= start;
}
function longestPalindromicSubstring(s) {
let longestPalindrome = '';
for (let i=0; i < s.length; i++) {
let j = s.length-1;
while (s[i] !== s[j] && i <= j) {
j--;
}
if (s[i] === s[j]) {
if (isPalindrome(s, i, j)) {
const validPalindrome = s.substring(i, j+1"
Tiago R. - "function isPalindrome(s, start, end) {
while (s[start] === s[end] && end >= start) {
start++;
end--;
}
return end <= start;
}
function longestPalindromicSubstring(s) {
let longestPalindrome = '';
for (let i=0; i < s.length; i++) {
let j = s.length-1;
while (s[i] !== s[j] && i <= j) {
j--;
}
if (s[i] === s[j]) {
if (isPalindrome(s, i, j)) {
const validPalindrome = s.substring(i, j+1"See full answer
"Identify the best platform to reach millennials (Youtube, Instagram).
Run a survey/ research on pain points millennials are facing in the smart home products sector
Identify a product that gives the most value with optimal effort
Build and Launch
The marketing team should use the same platform to identify key influencers on social platforms and use an emotional connection to millennials with an ad campaign"
Bipin G. - "Identify the best platform to reach millennials (Youtube, Instagram).
Run a survey/ research on pain points millennials are facing in the smart home products sector
Identify a product that gives the most value with optimal effort
Build and Launch
The marketing team should use the same platform to identify key influencers on social platforms and use an emotional connection to millennials with an ad campaign"See full answer
"clarify question- do you want me to focus on Home, wearables, automotive or any specific IOT product?
Interviewer - whichever you want to focus
Rephrase:
So I believe our goal is to make life easier for users using Internet of things (IOT) product. Does that sound good?
Interviewer - Yes
Ok so if I understand it, I can focus on any IOT product. For me Internet of things product is the one which is smart and connects to internet and makes people day to day tasks easy.
With evolution of 5G Interne"
Priyank S. - "clarify question- do you want me to focus on Home, wearables, automotive or any specific IOT product?
Interviewer - whichever you want to focus
Rephrase:
So I believe our goal is to make life easier for users using Internet of things (IOT) product. Does that sound good?
Interviewer - Yes
Ok so if I understand it, I can focus on any IOT product. For me Internet of things product is the one which is smart and connects to internet and makes people day to day tasks easy.
With evolution of 5G Interne"See full answer
Product Design
🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.
"As a product owner, I will ensure that I am up to date about the featuer development. First of all, I want to ensure it is estimated rightly as much as possible. It uses empirical data to estimate so that our estimate is as close as actual as possible. Also, the feature will be divided in such a way that each component of the feature can be achieved in a 2-week cadence if we are running a by-weekly feature cycle. And also I will keep some buffer as well. I will ensure I communicate to the stakeh"
Indranil G. - "As a product owner, I will ensure that I am up to date about the featuer development. First of all, I want to ensure it is estimated rightly as much as possible. It uses empirical data to estimate so that our estimate is as close as actual as possible. Also, the feature will be divided in such a way that each component of the feature can be achieved in a 2-week cadence if we are running a by-weekly feature cycle. And also I will keep some buffer as well. I will ensure I communicate to the stakeh"See full answer
"So Machine learning provides the ability to machines to learn patterns from large data. So applying the same when needed. So the type of algorithm depends on the requirement/use case or the data.
For example, if we have data that is labeled and we need to do classification then we will go and perform logistic regression but if we want prediction instead of classification, then we will go and build a regression model.
In case the data is not labeled, then we can go ahead and build a model usin"
Anonymous Muskox - "So Machine learning provides the ability to machines to learn patterns from large data. So applying the same when needed. So the type of algorithm depends on the requirement/use case or the data.
For example, if we have data that is labeled and we need to do classification then we will go and perform logistic regression but if we want prediction instead of classification, then we will go and build a regression model.
In case the data is not labeled, then we can go ahead and build a model usin"See full answer
"Product management deals with new product development, enhancing existing products, monitoring the performance, planning, forecasting, monetization, pricing, product launch, and marketing of a product.
Personally, I would like to improve many aspects of Product management.
Try to understand the Product we are developing as much as possible. Brainstorm and think about long term goals and vision for product we are responsible for.
Hypothesize the Product vision and value of the product for"
Avi P. - "Product management deals with new product development, enhancing existing products, monitoring the performance, planning, forecasting, monetization, pricing, product launch, and marketing of a product.
Personally, I would like to improve many aspects of Product management.
Try to understand the Product we are developing as much as possible. Brainstorm and think about long term goals and vision for product we are responsible for.
Hypothesize the Product vision and value of the product for"See full answer
"This is another Fermi problem — an estimation or approximation problem with limited information and back-of-the-envelope calculations. There's no right answer: interviewers want to understand how you think and how well you can explain your reasoning, rather than what you already know.
Recall the formula for Fermi problems:
Ask clarifying questions
Catalog what you know
Make equation(s)
Think about edge cases to add to equation
**Breakdown components of your"
Exponent - "This is another Fermi problem — an estimation or approximation problem with limited information and back-of-the-envelope calculations. There's no right answer: interviewers want to understand how you think and how well you can explain your reasoning, rather than what you already know.
Recall the formula for Fermi problems:
Ask clarifying questions
Catalog what you know
Make equation(s)
Think about edge cases to add to equation
**Breakdown components of your"See full answer
"ArrayList allows constant time access (O(1)) to elements using their index because it uses a dynamic array internally, whereas LinkedList requires traversal from the head node, resulting in linear time complexity (O(n))."
Aziz V. - "ArrayList allows constant time access (O(1)) to elements using their index because it uses a dynamic array internally, whereas LinkedList requires traversal from the head node, resulting in linear time complexity (O(n))."See full answer
"Clarifying questions : 1. What is the product Hardware/software specific ? 2. Any particular analytics done or should it be covered as a part of the solution ? 3. Any resource constraints ? 4. Any timeline in particular ?
In order to internationalize a product, the following steps could be done:
Identify the market/regions : Based on, say, Google analytics, find the regions which has the most clicks / attention for our product
Going wide vs Going deep : Is it a single region that we are"
Googlepm 1. - "Clarifying questions : 1. What is the product Hardware/software specific ? 2. Any particular analytics done or should it be covered as a part of the solution ? 3. Any resource constraints ? 4. Any timeline in particular ?
In order to internationalize a product, the following steps could be done:
Identify the market/regions : Based on, say, Google analytics, find the regions which has the most clicks / attention for our product
Going wide vs Going deep : Is it a single region that we are"See full answer
"Assumption:
question is about people in the US, and we define frequent bar visitor as someone who visits a bar twice a week.
we are defining bars as places that people go for alcoholic beverage , not for the snacks , non alcoholic beverage or sports TV
population of use 330M , 80m per age group
0-20 (eliminate because drinking age is 21 and above)
60-80 (eliminate because they prefer drinks at home or sit down restaurants or are very health conscious to go drinking)
20-30 : 40m
80%"
Ananya M. - "Assumption:
question is about people in the US, and we define frequent bar visitor as someone who visits a bar twice a week.
we are defining bars as places that people go for alcoholic beverage , not for the snacks , non alcoholic beverage or sports TV
population of use 330M , 80m per age group
0-20 (eliminate because drinking age is 21 and above)
60-80 (eliminate because they prefer drinks at home or sit down restaurants or are very health conscious to go drinking)
20-30 : 40m
80%"See full answer
"My mistake: gave a very generic project management approach and didn't properly address how to get value out of it sooner
Expected: being able to structure a project in a way that delivers value at incremental steps along the way"
Praniti S. - "My mistake: gave a very generic project management approach and didn't properly address how to get value out of it sooner
Expected: being able to structure a project in a way that delivers value at incremental steps along the way"See full answer
"Designing a smart fridge is something we can compare with designing our smart phone, obviously which is not as handy as our mobile phones. I can design in such a way that it is operated through our mobile phone. for ex, if we are out of town instead of worrying about the condition of the items in the fridge we can stay close with just one click away, while coming to product installation then I would say instead of taking a lot of time in searching the items, showcase a display where a list of it"
Soundharya S. - "Designing a smart fridge is something we can compare with designing our smart phone, obviously which is not as handy as our mobile phones. I can design in such a way that it is operated through our mobile phone. for ex, if we are out of town instead of worrying about the condition of the items in the fridge we can stay close with just one click away, while coming to product installation then I would say instead of taking a lot of time in searching the items, showcase a display where a list of it"See full answer
"House buy is time-consuming and complex. (too many steps involved, from selecting a house, to agent, loan, closing, moving, knowing the place and people to settling down). Lets leverage power of fb and socialness to simplify house buying. we will create product for that
users for home buying
buyer ( for sake of simplicity - assume employed family with kids. local buyer)
seller
agent
user flow for buying:
Market research: understand the market, research area (friends, family ta"
Praveen V. - "House buy is time-consuming and complex. (too many steps involved, from selecting a house, to agent, loan, closing, moving, knowing the place and people to settling down). Lets leverage power of fb and socialness to simplify house buying. we will create product for that
users for home buying
buyer ( for sake of simplicity - assume employed family with kids. local buyer)
seller
agent
user flow for buying:
Market research: understand the market, research area (friends, family ta"See full answer