"user surveys and interviews: Ask users how well the reactions reflect their feelings.
sentiment analysis : Analyze comment sentiment to see if it aligns with reactions.
Machine learning classification model: Train models to predict user emotion from post content and compare with selected reactions."
Manaswini D. - "user surveys and interviews: Ask users how well the reactions reflect their feelings.
sentiment analysis : Analyze comment sentiment to see if it aligns with reactions.
Machine learning classification model: Train models to predict user emotion from post content and compare with selected reactions."See full answer
"Any cycle would cause the prerequisite to be greater than the course. This passes all the tests:
function canFinish(_numCourses, prerequisites) {
for (const [a, b] of prerequisites) {
if (b > a) return false
}
return true
}
`"
Jeremy D. - "Any cycle would cause the prerequisite to be greater than the course. This passes all the tests:
function canFinish(_numCourses, prerequisites) {
for (const [a, b] of prerequisites) {
if (b > a) return false
}
return true
}
`"See full answer
"clarify:
so does the 5% drop a sudden drop or overtime in the one week
does it broadly drop 5% or it dropped only in some regions or in some segments like new acqusition / frequent active customers?
or does the 5% drop also happened last year same period?
DAU = acqusition x activation x retention
segment:
I will first quickly do some EDA to find out problem, like calculate the DAU drop in new customer, tenured customer, between regions to find out is there any difference.
then I will also look"
Yuexiang Y. - "clarify:
so does the 5% drop a sudden drop or overtime in the one week
does it broadly drop 5% or it dropped only in some regions or in some segments like new acqusition / frequent active customers?
or does the 5% drop also happened last year same period?
DAU = acqusition x activation x retention
segment:
I will first quickly do some EDA to find out problem, like calculate the DAU drop in new customer, tenured customer, between regions to find out is there any difference.
then I will also look"See full answer
"--country names are UPPERCASE but the table in the in the question showing lowercase. That's why it took me a while to figure it out until I ran the country column
WITH RECURSIVE Hierarchy AS (
SELECT
e.Emp_ID,
CONCAT(e.FirstName, ' ', e.MiddleName, ' ', e.LastName) AS FullName,
e.Manager_ID,
0 AS Level,
CASE
WHEN e.Country = 'IRELAND' THEN s.Salary * 1.09
WHEN e.Country = 'INDIA' THEN s.Salary * 0.012
ELSE s.Salary
"
Victor N. - "--country names are UPPERCASE but the table in the in the question showing lowercase. That's why it took me a while to figure it out until I ran the country column
WITH RECURSIVE Hierarchy AS (
SELECT
e.Emp_ID,
CONCAT(e.FirstName, ' ', e.MiddleName, ' ', e.LastName) AS FullName,
e.Manager_ID,
0 AS Level,
CASE
WHEN e.Country = 'IRELAND' THEN s.Salary * 1.09
WHEN e.Country = 'INDIA' THEN s.Salary * 0.012
ELSE s.Salary
"See full answer
Data Scientist
Coding
+3 more
🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.
"Initialize left pointer: Set a left pointer left to 0.
Iterate through the array: Iterate through the array from left to right.
If the current element is not 0, swap it with the element at the left pointer and increment left.
Time complexity: O(n). The loop iterates through the entire array once, making it linear time.
Space complexity: O(1). The algorithm operates in-place, modifying the input array directly without using additional data structures.
"
Avon T. - "Initialize left pointer: Set a left pointer left to 0.
Iterate through the array: Iterate through the array from left to right.
If the current element is not 0, swap it with the element at the left pointer and increment left.
Time complexity: O(n). The loop iterates through the entire array once, making it linear time.
Space complexity: O(1). The algorithm operates in-place, modifying the input array directly without using additional data structures.
"See full answer
"In the Transformer architecture, the decoder differs from the encoder primarily in its additional mechanisms designed to handle autoregressive sequence generation. Here's a breakdown of the key differences:
Self-Attention Mechanism:
Encoder: The encoder has a standard self-attention mechanism that allows each token to attend to all other tokens in the input sequence.
Decoder: The decoder has two types of self-attention. The first is the same as in the encoder, but the second is mas"
Ranj A. - "In the Transformer architecture, the decoder differs from the encoder primarily in its additional mechanisms designed to handle autoregressive sequence generation. Here's a breakdown of the key differences:
Self-Attention Mechanism:
Encoder: The encoder has a standard self-attention mechanism that allows each token to attend to all other tokens in the input sequence.
Decoder: The decoder has two types of self-attention. The first is the same as in the encoder, but the second is mas"See full answer
"There are couple of reasons for it -
Kind of role : Its a product manager role loaded with analytical work, So working with data in stringent regulatory guideline make it more exciting and thrilling.
Location & industry is like - Cherry on the cake, Bangalore weather and BFI is at its all time peak as people spending behavior is changing continuously, it will be interesting to see big giants like visa are managing it."
Nidhi S. - "There are couple of reasons for it -
Kind of role : Its a product manager role loaded with analytical work, So working with data in stringent regulatory guideline make it more exciting and thrilling.
Location & industry is like - Cherry on the cake, Bangalore weather and BFI is at its all time peak as people spending behavior is changing continuously, it will be interesting to see big giants like visa are managing it."See full answer
"The user table no longer exists as expected - I get an error that user does not contain user_id.
Note that querying the table results in only user:swuoevkivrjfta
select * FROM user
`"
Evan R. - "The user table no longer exists as expected - I get an error that user does not contain user_id.
Note that querying the table results in only user:swuoevkivrjfta
select * FROM user
`"See full answer
"
A couple of years ago, we were working on a project to integrate a new third-party data feed into our existing data processing pipeline. This data feed was critical for enhancing our trading algorithms with more comprehensive market data. Given the tight timeline and high stakes, I decided to push for a rapid implementation.
In my eagerness to meet the deadline, I underestimated the complexity of integrating this new data feed. I did not allocate sufficient time for thorough testing and valida"
Scott S. - "
A couple of years ago, we were working on a project to integrate a new third-party data feed into our existing data processing pipeline. This data feed was critical for enhancing our trading algorithms with more comprehensive market data. Given the tight timeline and high stakes, I decided to push for a rapid implementation.
In my eagerness to meet the deadline, I underestimated the complexity of integrating this new data feed. I did not allocate sufficient time for thorough testing and valida"See full answer
"WITH RECURSIVE fibonacci_series AS (
SELECT
1 AS n,
0 AS fib1,
1 AS fib2
UNION ALL
SELECT
n + 1 AS n,
fib2 AS fib1,
fib1 + fib2 AS fib2
FROM fibonacci_series
WHERE n < 20 -- Limit the series to 20 numbers
)
SELECT
n,
fib1 AS fib
FROM fibonacci_series
ORDER BY n;
`"
Yashasvi V. - "WITH RECURSIVE fibonacci_series AS (
SELECT
1 AS n,
0 AS fib1,
1 AS fib2
UNION ALL
SELECT
n + 1 AS n,
fib2 AS fib1,
fib1 + fib2 AS fib2
FROM fibonacci_series
WHERE n < 20 -- Limit the series to 20 numbers
)
SELECT
n,
fib1 AS fib
FROM fibonacci_series
ORDER BY n;
`"See full answer
"Is it bad to get the answer a different way? Will they mark that as not knowing Bayes Theorem or just correct as it is an easier way to get the answer?
The way I went is to look at what happens when the factory makes 100 light bulbs. Machine A makes 60 of which 3 are faulty, Machine B makes 40 of which 1.2 are faulty. Therefore the pool of faulty lightbulbs is 3/4.2 = 5/7 from machine A and 1.2/4.2 = 3/7 from Machine B."
Will I. - "Is it bad to get the answer a different way? Will they mark that as not knowing Bayes Theorem or just correct as it is an easier way to get the answer?
The way I went is to look at what happens when the factory makes 100 light bulbs. Machine A makes 60 of which 3 are faulty, Machine B makes 40 of which 1.2 are faulty. Therefore the pool of faulty lightbulbs is 3/4.2 = 5/7 from machine A and 1.2/4.2 = 3/7 from Machine B."See full answer
"In the question it says: "above the overall average total posts", which to me implying a >, yet in the solution it uses >=
Caused me 1 hr to find out. plz fix"
Peter W. - "In the question it says: "above the overall average total posts", which to me implying a >, yet in the solution it uses >=
Caused me 1 hr to find out. plz fix"See full answer
"1) select avg(session) from table where session> 180
2) select round(sessiontime/300)*300 as sessionbin, count() as sessioncount from table group by round(sessiontime/300)300 order by session_bin
3) SELECT t1.country AS country_a,
t2.country AS country_b
FROM (
SELECT country, COUNT(*) AS session_count
FROM yourtablename
GROUP BY country
) AS t1
JOIN (
SELECT country, COUNT(*) AS session_count
FROM yourtablename
`GROUP BY countr"
Erjan G. - "1) select avg(session) from table where session> 180
2) select round(sessiontime/300)*300 as sessionbin, count() as sessioncount from table group by round(sessiontime/300)300 order by session_bin
3) SELECT t1.country AS country_a,
t2.country AS country_b
FROM (
SELECT country, COUNT(*) AS session_count
FROM yourtablename
GROUP BY country
) AS t1
JOIN (
SELECT country, COUNT(*) AS session_count
FROM yourtablename
`GROUP BY countr"See full answer
"`select employeeid, employeename, sum(maxscore) totalscore
from (
select e.id employeeid, e.name employeename, tr.testid , max(tr.score) maxscore
from employees e
join test_results tr
on e.id = tr.employee_id
group by tr.employeeid, tr.testid
order by 1
)
group by 1,2
order by 3 desc`
`"
Abbas M. - "`select employeeid, employeename, sum(maxscore) totalscore
from (
select e.id employeeid, e.name employeename, tr.testid , max(tr.score) maxscore
from employees e
join test_results tr
on e.id = tr.employee_id
group by tr.employeeid, tr.testid
order by 1
)
group by 1,2
order by 3 desc`
`"See full answer