အားလုံးပဲ မင်္ဂလာပါ။ ဒီနေ့ Day 24 အတွက်ကတော့ Leetcode ရဲ့ difficulties Easy level problem တစ်ပုဒ်ဖြစ်တဲ့ 610. Triangle Judgement ဆိုတဲ့ problem ကို ရွေးချယ်ထားပါတယ်။ ဒီပုစ္ဆာ မှာတော့ Triangle ဆိုတဲ့ table လေးကိုပေးထားပါတယ်။
ကျွန်တော်တို့လုပ်ပေးဖို့လိုတာကတော့ Triangle ဖြစ်မဖြစ်ကို Yes or No နဲ့ result ပေးရမှာပဲဖြစ်ပါတယ်။
1Example 1:2 3Input: 4Triangle table:5+----+----+----+6| x | y | z |7+----+----+----+8| 13 | 15 | 30 |9| 10 | 20 | 15 |10+----+----+----+11Output: 12+----+----+----+----------+13| x | y | z | triangle |14+----+----+----+----------+15| 13 | 15 | 30 | No |16| 10 | 20 | 15 | Yes |17+----+----+----+----------+x, y, z ဆိုတဲ့ အနားသုံးနားပေးထားတော့ "Triangle ဖြစ်ဖို့ဆိုရင် အနားနှစ်ဖက်ပေါင်းခြင်းက ကျန်အနားတစ်ဖက်ထက်ရှည်နေရမှာပဲဖြစ်ပါတယ်။" အဲ့လိုမှမဟုတ်ရင် Triangle မဖြစ်ဘူးလို့သတ်မှတ်ပေးလိုက်ရင်ရပြီပဲဖြစ်ပါတယ်။
ကျွန်တော်ကတော့အောက်ကအတိုင်းလေးရေးဖြစ်ခဲ့ပါတယ်။
1** SQL**2SELECT x, y, z , (3 CASE 4 WHEN x + y > z AND y + z > x AND x + z > y5 THEN 'Yes'6 ELSE 'No'7 END8) 9AS triangle FROM Triangle;အပေါ်မှာပြောခဲ့တဲ့အတိုင်းအဲ အနားနှစ်နားကို ပေါင်းပြီးကျန်ခဲ့တဲ့အနားတစ်ဖက်ထက်ကြီးရင် 'Yes' မဟုတ်ရင်'No' ဆိုပြီး Case လေးနဲ့သတ်မှတ်ပေးလိုက်တာပဲဖြစ်ပါတယ်။
ဒါဆိုရင် လိုချင်တဲ့အဖြေလေးရရှိသွားပြီပဲဖြစ်ပါတယ်ဗျာ။ Video ကိုတော့အောက်က YouTube link လေးကနေတစ်ဆင့်ဝင်ကြည့်နိုင်ပါတယ်ဗျာ။ Stay safe and see you allပါဗျာ။
30 Days Of LeetCode Database Day 24 - 610. Triangle Judgement
Watch on YouTubeDiscussion
Join the conversation
How do you feel about this article?
Comments
Sign in to join the conversation
Sign in to be the first to comment!
Share Your Article
Share with your professional network
Recent Articles

AWS - Application Load Balancer
Elastic Load Balancing (ELB) ELB ဆိုတာကတော့ request တွေကို တစ်နေရာတည်းမှ လက်ခံကာ Amazon EC2 instances၊ containers, etc.....

Terraform Day 3: Benefits of Terraform State
Terraform ကိုလေ့လာ တဲ့အခါ ကျွန််တော်တို့ရဲ့ Project Folder ထဲမှာ terraform.tfstate ဆိုတဲ့ ဖိုင်လေးကို တွေ့ဖူးကြပါလိမ့်မယ...

Terraform Day 2: Essential IaC Principles You Must Know
မနေ့ကတော့ Terraform အကြောင်း အကြမ်းဖျင်း Concept ကို ပြောပြခဲ့ပြီးပြီဆိုတော့ ဒီနေ့မှာတော့ Terraform ကို Professional ကျက...

TCP/IP Protocol
အားလုံးပဲမင်္ဂလာပါ။ ဒီနေ့ ကျွန်တော်တို့ TCP/IP Protocol အကြောင်း ဆွေးနွေးသွားပါမယ်။ ပထမဆုံးအနေနဲ့ TCP/IP ရဲ့ History လေး...

Terraform Day 1: Introduction to IAC and Terraform
ကျွန်တော်တို့ cloud အကြောင်း စပြောကြပြီဆိုရင် အရင်ဆုံး ခေါင်းထဲရောက်လာတာ Console ထဲဝင်၊ UI ကနေ ခလုတ်လေးတွေ လိုက်နှိပ်ပြီ...


