LeetCode Medium 1440 Point72 “Evaluate Boolean Expression' Interview SQL Question Explanation

preview_player
Показать описание

In this video I solve and explain a medium difficulty leetcode SQL question using MySQL query. This question has been asked in Apple, Facebook, Amazon, Google, Adobe, Microsoft, Adobe interviews or what we popularly call FAANG interviews.
I explain the related concept as well. This question includes points to keep in mind to develop SQL queries.

LeetCode is the best platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.

If you found this helpful, Like and Subscribe to the channel for more content.

#LeetCodeSQL #FAANG #SQLinterviewQuestions
Рекомендации по теме
Комментарии
Автор

your videos are helpful. please keep on making.

vijaychilkewar
Автор

thank you for the video, very nice explanation, here is another way (may not be efficient):
also we can use inner join itself instead f left outer join as question states
"The values of left_operand and right_operand are guaranteed to be in the Variables table", pls confirm my understanding, thanks

select e.left_operand
, e.operator
, e.right_operand
, case when e.operator = '>' then if(v1.value > v2.value, 'true', 'false')
when e.operator = '<' then if(v1.value < v2.value, 'true', 'false')
else if(v1.value = v2.value, 'true', 'false')
end as "value"
from Expressions e
join Variables v1 on e.left_operand = v1.name
join Variables v2 on e.right_operand = v2.name

saisushanthdurvasulabitsian