"Let’s say the matrix is m x n (i.e., m rows and n columns).
Start from the top-right corner of the matrix.
Move left if you see a 1.
Move down if you see a 0.
Keep track of the row index where you last saw the leftmost 1 — that row has the most 1s.
public class MaxOnesRow {
public static int rowWithMostOnes(int matrix) {
int rows = matrix.length;
int cols = matrix[0].length;
int maxRowIndex = -1;
int j = cols - 1; /"
Khushbu R. - "Let’s say the matrix is m x n (i.e., m rows and n columns).
Start from the top-right corner of the matrix.
Move left if you see a 1.
Move down if you see a 0.
Keep track of the row index where you last saw the leftmost 1 — that row has the most 1s.
public class MaxOnesRow {
public static int rowWithMostOnes(int matrix) {
int rows = matrix.length;
int cols = matrix[0].length;
int maxRowIndex = -1;
int j = cols - 1; /"See full answer
"Clarify Questions
• Target Audience: Are we focusing on existing TikTok users, new users, or both?
• Scope of Search Features: Are we looking at in-app search, search engine optimization (SEO), or both?
• Geographical Focus: Are there specific regions we are targeting for user acquisition?
Goal
Our primary goal is to increase user adoption and market share by making it easier for users to discover and engage with TikTok Shop through optimized search features.
User Segments
Current TikTo"
Vihari K. - "Clarify Questions
• Target Audience: Are we focusing on existing TikTok users, new users, or both?
• Scope of Search Features: Are we looking at in-app search, search engine optimization (SEO), or both?
• Geographical Focus: Are there specific regions we are targeting for user acquisition?
Goal
Our primary goal is to increase user adoption and market share by making it easier for users to discover and engage with TikTok Shop through optimized search features.
User Segments
Current TikTo"See full answer
"Null hypothesis (H0): the coin is fair (unbiased), meaning the probability of flipping a head is 0.5
Alternative (H1): the coin is unfair (biased), meaning the probability of flipping a head is not 0.5
To test this hypothesis, I would calculate a p-value which is the probability of observing a result as extreme as, or more extreme than, what I say in my sample, assuming the null hypothesis is true.
I could use the probability mass function of a binomial random variable to model the coin toss b"
Lucas G. - "Null hypothesis (H0): the coin is fair (unbiased), meaning the probability of flipping a head is 0.5
Alternative (H1): the coin is unfair (biased), meaning the probability of flipping a head is not 0.5
To test this hypothesis, I would calculate a p-value which is the probability of observing a result as extreme as, or more extreme than, what I say in my sample, assuming the null hypothesis is true.
I could use the probability mass function of a binomial random variable to model the coin toss b"See full answer
Statistics & Experimentation
🧠Want an expert answer to a question? Saving questions lets us know what content to make next.
"Select
interface,
Count(case when issuccessfulpost then 1 end) as post_success,
Count() as postattempt,
ROUND((COUNT(CASE WHEN issuccessfulpost THEN 1 END) * 100 / COUNT()), 2) AS postsuccess_rate
from post where interface like 'Iphone%'
group by 1
order by postsuccessrate desc
`"
Richard B. - "Select
interface,
Count(case when issuccessfulpost then 1 end) as post_success,
Count() as postattempt,
ROUND((COUNT(CASE WHEN issuccessfulpost THEN 1 END) * 100 / COUNT()), 2) AS postsuccess_rate
from post where interface like 'Iphone%'
group by 1
order by postsuccessrate desc
`"See full answer
"JJ Zhou, co-founder at the previous company taught me this: if you want to get people build a boat, tell them how great the sea is. That advice guided me through challenges I face to get my team on board with my vision.
When i became the payment PM where I oversaw the user checkout experience, I decided to introduce Agile approach and organized the workflow into Scrums. The challenge was most engineers and data-scientists in my team were from banks so they were comfortable with water-fall. On"
Darren L. - "JJ Zhou, co-founder at the previous company taught me this: if you want to get people build a boat, tell them how great the sea is. That advice guided me through challenges I face to get my team on board with my vision.
When i became the payment PM where I oversaw the user checkout experience, I decided to introduce Agile approach and organized the workflow into Scrums. The challenge was most engineers and data-scientists in my team were from banks so they were comfortable with water-fall. On"See full answer
"CQs
Is 10x capacity any specific time or in general
Any time of the day , store should be able to handle
To confirm, Grocery store objective is to sell day to day grocery and vegetables? Or do we want to include any other products
Day to day grocery
Why is the foot traffic more than 10x the typical cap. Was the store designed poorly or did the store not predict the foot traffic correctly ?
We suddenly become local's favorite
We want to design this single store to handle 10X capacity an"
Abhi S. - "CQs
Is 10x capacity any specific time or in general
Any time of the day , store should be able to handle
To confirm, Grocery store objective is to sell day to day grocery and vegetables? Or do we want to include any other products
Day to day grocery
Why is the foot traffic more than 10x the typical cap. Was the store designed poorly or did the store not predict the foot traffic correctly ?
We suddenly become local's favorite
We want to design this single store to handle 10X capacity an"See full answer
"This is an interesting Favorite Product question. Normally when we're asked this question we pick technology products, but this time the interviewer wanted to throw us a curveball by asking about a non-technical product. Don't worry - it still follows the same approach:
Choose a product and briefly explain what it is
Who are the users?
What are their pain points?
How did competitors solve it in the past?
**How does this product address these pain points differe"
Exponent - "This is an interesting Favorite Product question. Normally when we're asked this question we pick technology products, but this time the interviewer wanted to throw us a curveball by asking about a non-technical product. Don't worry - it still follows the same approach:
Choose a product and briefly explain what it is
Who are the users?
What are their pain points?
How did competitors solve it in the past?
**How does this product address these pain points differe"See full answer
"Our team were developing a HQ trivia for fitness. So at that moment our focus was developing an eye-catching animation for both iOS and Android. By the way, implementing an animation were hard without the progress of it. So we wanted to see an immediate progress. So I decided to use tools or libraries such as Lottie or Kite. Then it increased the quality and the productivity dramatically. So our designer were happy with it and also our dev team could reuse the code from the designed animation fr"
Woongshik C. - "Our team were developing a HQ trivia for fitness. So at that moment our focus was developing an eye-catching animation for both iOS and Android. By the way, implementing an animation were hard without the progress of it. So we wanted to see an immediate progress. So I decided to use tools or libraries such as Lottie or Kite. Then it increased the quality and the productivity dramatically. So our designer were happy with it and also our dev team could reuse the code from the designed animation fr"See full answer
"Getting things done : I am extremely proud of walking the extra mile to get things done which I am extremely proud of in my career
Ladder transfer : Being on the tactical front, to dream about creating a product from its inception to the delivery and being able to achieve it
Gaining trust : Leading without authority is critical and gaining trust in the process of the peers and stakeholders is one thing I am extremely proud of."
Googlepm 1. - "Getting things done : I am extremely proud of walking the extra mile to get things done which I am extremely proud of in my career
Ladder transfer : Being on the tactical front, to dream about creating a product from its inception to the delivery and being able to achieve it
Gaining trust : Leading without authority is critical and gaining trust in the process of the peers and stakeholders is one thing I am extremely proud of."See full answer
"Was given 90 minutes with an exhaustive set of requirements to be implemented as a full-stack coding exercise. It was supposed to have a UX, a server and a database to store and retrieve data.
The IDE was supposed to be self-setup before the interview.
The panel asked questions on top of the implementation around decision making from a technical perspective"
Aman G. - "Was given 90 minutes with an exhaustive set of requirements to be implemented as a full-stack coding exercise. It was supposed to have a UX, a server and a database to store and retrieve data.
The IDE was supposed to be self-setup before the interview.
The panel asked questions on top of the implementation around decision making from a technical perspective"See full answer
"Assumptions: This is an entirely new app and not part of FB
Clarification questions:
Q: What type of doctors are they looking for? It seems like an app would be for a more generalist doctor to establish relationship and not some type of emergency situation
A: Yes
Q: When we say looking for doctors whats the scope of this? Should we include making the actual appointment, does this happen on platform?
A: Yes, initial appointment
Ok thanks based on that I think we have enough to get started.
"
Anonymous Hummingbird - "Assumptions: This is an entirely new app and not part of FB
Clarification questions:
Q: What type of doctors are they looking for? It seems like an app would be for a more generalist doctor to establish relationship and not some type of emergency situation
A: Yes
Q: When we say looking for doctors whats the scope of this? Should we include making the actual appointment, does this happen on platform?
A: Yes, initial appointment
Ok thanks based on that I think we have enough to get started.
"See full answer
"I was working in a Silicon Validation group and the roadmap for all validation strategy was defined, But the problem with that was it was as with the roadmap given, the quality would have compromised and hence, I raised a concern regarding the quality of the product.
Initially the team members were not convinced, I borrowed a week's time with them and scheduled another meeting and brought up all the data(high level) which we should be covering during the validation timeframe.
Also added tentati"
Shubham A. - "I was working in a Silicon Validation group and the roadmap for all validation strategy was defined, But the problem with that was it was as with the roadmap given, the quality would have compromised and hence, I raised a concern regarding the quality of the product.
Initially the team members were not convinced, I borrowed a week's time with them and scheduled another meeting and brought up all the data(high level) which we should be covering during the validation timeframe.
Also added tentati"See full answer