"naive solution:
def countprefixpairs(words):
n = len(words)
count = 0
for i in range(n):
for j in range(i + 1, n):
if words[i].startswith(words[j]) or words[j].startswith(words[i]):
count += 1
return count
using tries for when the list of words is very long:
from collections import Counter
class TrieNode:
def init(self):
self.children = {}
self.count = 0 # To count the number of words ending at this node"
Anonymous Unicorn - "naive solution:
def countprefixpairs(words):
n = len(words)
count = 0
for i in range(n):
for j in range(i + 1, n):
if words[i].startswith(words[j]) or words[j].startswith(words[i]):
count += 1
return count
using tries for when the list of words is very long:
from collections import Counter
class TrieNode:
def init(self):
self.children = {}
self.count = 0 # To count the number of words ending at this node"See full answer
"Zero in on the problem, the expectations of user are to find a restaurant but their feed is uninspired so they may bounce out of Yelp.
Identify the impact size of user feeling like discovery is not personalised enough by seeing % of users that selected a restaurant from the homepage
If large enough, I will look at who is likely the ones that want personalisation and why? Do they feel like they want to try new restaurants or are they finding it difficult to find restaurants they have been"
Chermaine Y. - "Zero in on the problem, the expectations of user are to find a restaurant but their feed is uninspired so they may bounce out of Yelp.
Identify the impact size of user feeling like discovery is not personalised enough by seeing % of users that selected a restaurant from the homepage
If large enough, I will look at who is likely the ones that want personalisation and why? Do they feel like they want to try new restaurants or are they finding it difficult to find restaurants they have been"See full answer
"
Why do we want to increase the price?
How much do we need to increase? Is it tied to some kind of revenue target?
What is the region in which price needs to be increased? - Say India
Who are the major players in that region who offer similar services and how are they priced?
Will the users switch to those competitors? What is our unique proposition for retention?
Do we have any leverage against them which will stop the users from churning?
Any change in pricing or anything major like terms an"
Ekta M. - "
Why do we want to increase the price?
How much do we need to increase? Is it tied to some kind of revenue target?
What is the region in which price needs to be increased? - Say India
Who are the major players in that region who offer similar services and how are they priced?
Will the users switch to those competitors? What is our unique proposition for retention?
Do we have any leverage against them which will stop the users from churning?
Any change in pricing or anything major like terms an"See full answer
Product Manager
Product Strategy
🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.
"In my role as a Product Manager at a B2B SaaS startup, I encountered a situation where we were facing a critical issue with one of our key features. Our engineering team proposed a quick fix that would address the immediate problem, but it was clear that this solution wouldn't provide a sustainable long-term solution. Despite the pressure to implement the short-term fix and resolve the issue swiftly, I decided to advocate for a more comprehensive, long-term strategy that would address the root c"
Shivam B. - "In my role as a Product Manager at a B2B SaaS startup, I encountered a situation where we were facing a critical issue with one of our key features. Our engineering team proposed a quick fix that would address the immediate problem, but it was clear that this solution wouldn't provide a sustainable long-term solution. Despite the pressure to implement the short-term fix and resolve the issue swiftly, I decided to advocate for a more comprehensive, long-term strategy that would address the root c"See full answer
"Clarify
What do we mean by memorialize?
Are we aiming to launch a physical or software product?
What is our goal with this product?
Are there specific types of pets we have in mind?
Assumption
Memorialize means to remind ourselves about our loved pets who passed away. We would like to launch a software product. The goal is to help users cope with the lose of their beloved pets. We also focus on house pets, keeping it for dogs and cats as the biggest market for pets.
User"
Tomer B. - "Clarify
What do we mean by memorialize?
Are we aiming to launch a physical or software product?
What is our goal with this product?
Are there specific types of pets we have in mind?
Assumption
Memorialize means to remind ourselves about our loved pets who passed away. We would like to launch a software product. The goal is to help users cope with the lose of their beloved pets. We also focus on house pets, keeping it for dogs and cats as the biggest market for pets.
User"See full answer
"import Foundation
func spiralCopy(inputMatrix: [[Int]]) -> [Int] {
let arr = inputMatrix
var top = 0, down = arr.count - 1
var left = 0, right = arr[0].count - 1
if top == down && left == right {
return arr[top]
}
var ans: [Int] = []
while top <= down && left <= right {
for i in left..<right {
ans.append(arrtop)
}
for i in top..<down {
ans.append(arri)
}
fo"
Reno S. - "import Foundation
func spiralCopy(inputMatrix: [[Int]]) -> [Int] {
let arr = inputMatrix
var top = 0, down = arr.count - 1
var left = 0, right = arr[0].count - 1
if top == down && left == right {
return arr[top]
}
var ans: [Int] = []
while top <= down && left <= right {
for i in left..<right {
ans.append(arrtop)
}
for i in top..<down {
ans.append(arri)
}
fo"See full answer
"Assumptions & Clarifications
Users have access to all Google Workspace applications like Google Drive, Gmail and the same photo editing tool - let us call this tool - Google Photo Editor (GPhoto).
Users can share the images like Google Docs - giving people read-only, read-write / edit access
Goals
Google's vision is to organize the world's information and make it accessible. GPhoto's mission / goal is to organize the world’s photo and make it accessible to others to view, edit or"
Karthik M. - "Assumptions & Clarifications
Users have access to all Google Workspace applications like Google Drive, Gmail and the same photo editing tool - let us call this tool - Google Photo Editor (GPhoto).
Users can share the images like Google Docs - giving people read-only, read-write / edit access
Goals
Google's vision is to organize the world's information and make it accessible. GPhoto's mission / goal is to organize the world’s photo and make it accessible to others to view, edit or"See full answer
"Total volume of the swimming pool, let's say it's a standard 50m x 25 m x 2m =2500 m3 = 2.5 million litter
standard water horse water flow rate is 17 liter per min.
So, 2.5 m / 17 =147,059 min"
onering2ruleall - "Total volume of the swimming pool, let's say it's a standard 50m x 25 m x 2m =2500 m3 = 2.5 million litter
standard water horse water flow rate is 17 liter per min.
So, 2.5 m / 17 =147,059 min"See full answer
"It could make Gmail less accessible to people who cannot afford to pay for it.
It could lead to users switching to other email providers.
It could damage Google's reputation as a company that provides free services."
Praful B. - "It could make Gmail less accessible to people who cannot afford to pay for it.
It could lead to users switching to other email providers.
It could damage Google's reputation as a company that provides free services."See full answer
"In details: setting k=1 in KNN makes the model fit very closely to the training data, capturing a lot of the data's noise and leading to a model that may not generalize well to unseen data. This results in a high-variance scenario."
Taha U. - "In details: setting k=1 in KNN makes the model fit very closely to the training data, capturing a lot of the data's noise and leading to a model that may not generalize well to unseen data. This results in a high-variance scenario."See full answer
"General Approach:
In a funnel, prospects that dropped off at the very end just before conversion are the ones that were most likely to convert simply because they went through the effort of going through multiple steps to advance to the very end of the funnel. The more the prospects advances through the funnel, better their probability of converting. I'd therefore focus more on reducing drop-offs at the final stages of the funnel for better conversion.
Caveats:
There are certain use-cases where"
Niji R. - "General Approach:
In a funnel, prospects that dropped off at the very end just before conversion are the ones that were most likely to convert simply because they went through the effort of going through multiple steps to advance to the very end of the funnel. The more the prospects advances through the funnel, better their probability of converting. I'd therefore focus more on reducing drop-offs at the final stages of the funnel for better conversion.
Caveats:
There are certain use-cases where"See full answer
"Looked at use-cases - what would be biggest value props be. Looked at VIP people moving to save the cost of private airplane, security personnel and for everyday people it could be used for emergencies when people had to be moved quickly and safely. Looked at industrial use cases also for security such as moving precious stones like diamonds or high amount of cash where there would be high security, armoured trucks and logistics cost. Decided to narrow down to industrial use and went deeper int"
Nanda S. - "Looked at use-cases - what would be biggest value props be. Looked at VIP people moving to save the cost of private airplane, security personnel and for everyday people it could be used for emergencies when people had to be moved quickly and safely. Looked at industrial use cases also for security such as moving precious stones like diamonds or high amount of cash where there would be high security, armoured trucks and logistics cost. Decided to narrow down to industrial use and went deeper int"See full answer