"A much better solution than the one in the article, below:
It looks like the ones writing articles here in Javascript do not understand the time/space complexity of javascript methods.
shift, splice, sort, etc... In the solution article you have a shift and a sort being done inside a while, that is, the multiplication of Ns.
My solution, below, iterates through the list once and then sorts it, separately. It´s O(N+Log(N))
class ListNode {
constructor(val = 0, next = null) {
th"
Guilherme F. - "A much better solution than the one in the article, below:
It looks like the ones writing articles here in Javascript do not understand the time/space complexity of javascript methods.
shift, splice, sort, etc... In the solution article you have a shift and a sort being done inside a while, that is, the multiplication of Ns.
My solution, below, iterates through the list once and then sorts it, separately. It´s O(N+Log(N))
class ListNode {
constructor(val = 0, next = null) {
th"See full answer
"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
"I told a story about having good intentions to help out a superior with a problem but I did so without seeking buy-in (permission) first. While I did solve the problem and provided value to him and my other colleagues, I was reprimanded for crossing boundaries and not respecting his privacy (I accessed his computer without his permission to deliver a resolution to a problem).
While I had good intentions and the outcome was good, my approach left me with a negative mark and a life long lesson r"
Zakery K. - "I told a story about having good intentions to help out a superior with a problem but I did so without seeking buy-in (permission) first. While I did solve the problem and provided value to him and my other colleagues, I was reprimanded for crossing boundaries and not respecting his privacy (I accessed his computer without his permission to deliver a resolution to a problem).
While I had good intentions and the outcome was good, my approach left me with a negative mark and a life long lesson r"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
"Several reasons why eCommerce will capture a trillion$ market in the next 10 years.
User consumption habits have changed and the pandemic has only accelerated user behavior to order online from the convenience of buying from home.
The supply chain is becoming better with partnerships and digital products are making shipping and deliveries much more convenient.
Many companies investing in automated shipping vehicles eg Drone deliveries and in near future we might see automated driving v"
Anjali M. - "Several reasons why eCommerce will capture a trillion$ market in the next 10 years.
User consumption habits have changed and the pandemic has only accelerated user behavior to order online from the convenience of buying from home.
The supply chain is becoming better with partnerships and digital products are making shipping and deliveries much more convenient.
Many companies investing in automated shipping vehicles eg Drone deliveries and in near future we might see automated driving v"See full answer
"-- Write your query here
With base as(
select
player_name
, team_id
, max(scores.gamescore) as gamescore
from players
join scores on players.playerid = scores.playerid
group by playername, teamid)
Select team_id
, player_name
, game_score
from (
Select teamid , playername ,gamescore, DenseRank() Over (Partition by teamid order by gamescore desc ) as rnk
from base) a where rnk <=2
`"
Palak S. - "-- Write your query here
With base as(
select
player_name
, team_id
, max(scores.gamescore) as gamescore
from players
join scores on players.playerid = scores.playerid
group by playername, teamid)
Select team_id
, player_name
, game_score
from (
Select teamid , playername ,gamescore, DenseRank() Over (Partition by teamid order by gamescore desc ) as rnk
from base) a where rnk <=2
`"See full answer
"Me: First let's clarify the user journey of the Facebook dating app
Interviewer:
Me: Do we know how success is defined in this context?
Interviewer: Please figure that out yourself
Me: Ok let's first discuss the mission of Facebook and how Facebook dating app is part of that. Then lets brainstorm what the goals would be for Facebook Dating. That help us determine the user behavior and metrics we can create. Finally let's fi"
kkkt - "Me: First let's clarify the user journey of the Facebook dating app
Interviewer:
Me: Do we know how success is defined in this context?
Interviewer: Please figure that out yourself
Me: Ok let's first discuss the mission of Facebook and how Facebook dating app is part of that. Then lets brainstorm what the goals would be for Facebook Dating. That help us determine the user behavior and metrics we can create. Finally let's fi"See full answer
"One project that stands out involved building a customer segmentation dashboard for our marketing team using Power BI. The goal was to help them target campaigns more effectively by segmenting customers based on purchase behavior and demographics.
Early in the project, I noticed significant data quality issues in the source tables coming from our CRM system. There were missing values in key fields like customer age and region, duplicate customer IDs, and inconsistencies in how product categories"
Tim F. - "One project that stands out involved building a customer segmentation dashboard for our marketing team using Power BI. The goal was to help them target campaigns more effectively by segmenting customers based on purchase behavior and demographics.
Early in the project, I noticed significant data quality issues in the source tables coming from our CRM system. There were missing values in key fields like customer age and region, duplicate customer IDs, and inconsistencies in how product categories"See full answer
"I am a book reader, so I use "goodreads" by amazon to track my reading. There are couple of things which can be done to increase user engagement on app.
User engagement on goodread is
creating profile
tagging books - want to read, reading, completed
marking up progress on daily reading.
Engaging with friends and their feedback about books.
Solutioning at each steps
Creating profile - App respond time is 2-3 min, which is very slow as compared to any general app,its circling"
Nidhi S. - "I am a book reader, so I use "goodreads" by amazon to track my reading. There are couple of things which can be done to increase user engagement on app.
User engagement on goodread is
creating profile
tagging books - want to read, reading, completed
marking up progress on daily reading.
Engaging with friends and their feedback about books.
Solutioning at each steps
Creating profile - App respond time is 2-3 min, which is very slow as compared to any general app,its circling"See full answer
"Clarification
What does showing ads mean ? Is it showing outside of the car as a mobile billboard or showing inside of the car on screens? —> Inside of the car / digital ads
What is our product strategy with Waymo. Do we want to get into the ride hailing business or license our tech —> To be defined by you
Do we have any near or long term revenue goals for this —> Get wide usage of Waymo tech and be a key driver in accelerating the adoption of self-driving cars accessible in the world"
stash - "Clarification
What does showing ads mean ? Is it showing outside of the car as a mobile billboard or showing inside of the car on screens? —> Inside of the car / digital ads
What is our product strategy with Waymo. Do we want to get into the ride hailing business or license our tech —> To be defined by you
Do we have any near or long term revenue goals for this —> Get wide usage of Waymo tech and be a key driver in accelerating the adoption of self-driving cars accessible in the world"See full answer
"SQL databases are relational, NoSQL databases are non-relational. SQL databases use structured query language and have a predefined schema. NoSQL databases have dynamic schemas for unstructured data. SQL databases are vertically scalable, while NoSQL databases are horizontally scalable."
Ali H. - "SQL databases are relational, NoSQL databases are non-relational. SQL databases use structured query language and have a predefined schema. NoSQL databases have dynamic schemas for unstructured data. SQL databases are vertically scalable, while NoSQL databases are horizontally scalable."See full answer
"Here is my implementation:
select
marketing_channel,
AVG(purchasevalue) as avgpurchase_value
from
attribution
group by marketing_channel
order by avgpurchasevalue DESC
;
There is no need to copy and past the line of code for calculating the average into order by, just Alias is enough because going by the order of execution in sql, Always, order by is executed after executing select clause."
Maliki U. - "Here is my implementation:
select
marketing_channel,
AVG(purchasevalue) as avgpurchase_value
from
attribution
group by marketing_channel
order by avgpurchasevalue DESC
;
There is no need to copy and past the line of code for calculating the average into order by, just Alias is enough because going by the order of execution in sql, Always, order by is executed after executing select clause."See full answer