Web Developing Channel - WDC

Web Developing Channel - WDC Contact information, map and directions, contact form, opening hours, services, ratings, photos, videos and announcements from Web Developing Channel - WDC, Information Technology Company, Yangon, Yangon.
(1)

How variables store data in memory (5mins)Variable တွေဆိုတာ programmer တိုင်းနဲ့ ကင်းမှာ မဟုတ်ပါဘူး။ ဒါမဲ့ အများစုက vari...
10/07/2023

How variables store data in memory
(5mins)

Variable တွေဆိုတာ programmer တိုင်းနဲ့ ကင်းမှာ မဟုတ်ပါဘူး။ ဒါမဲ့ အများစုက variable ဆိုတာ‌နဲ့ declaration, initialization, invocation လောက်နဲ့ပဲ သိကြတာ များပါတယ်။ ဒါကြောင့်မို့ ဒီတစ်ခေါက်မှာ variable တစ်လုံးဟာ နောက်ကွယ်မှာ ဘယ်လို အလုပ်လုပ်လဲဆိုတာကို ပြောပြသွားမှာပါ။

ကျွန်တော်တို့ value တစ်ခုကို store လုပ်ချင်တဲ့ အခါမျိုးမှာပဲ ဖြစ်ဖြစ်၊ အဲ့ value ကို ထပ်ခါ ထပ်ခါ သုံးဖို့ လိုအပ်လာတဲ့အခါပဲ ဖြစ်ဖြစ် variable ကို declaration/initialization တွေနဲ့ အသုံးပြုကြပါတယ်။ အဲ့လို အသုံးပြုတဲ့အခါမှာ ဒီ variable တွေထဲမှာ assign လုပ်ထားတဲ့ value က memory ထဲမှာ သွားသိမ်းရပါတယ်။ ပြီးတဲ့အခါ အဲ့ variable ကို ကျွန်တော်တို့ အသုံးပြုတဲ့အခါကျ value ကို memory ထဲကနပြီး သွားပြန်ဆွဲထုတ်ရပါတယ်။ ဒါက အကျဉ်းချုံးပါ။

အကျယ်က ကျွန်တော်တို့ variable တစ်လုံး initialize လိုက်ပြီဆိုရင်။ ဥပမာ -

char word_a = "A";

ဆိုကြပါစို့။ ဒီလိုလုပ်လိုက်ပြီဆိုရင် word ဆိုတဲ့ variable အတွက် memory address တစ်ခုကို ကျွန်တာ်တို့ရဲ့ RAM (Random Access Memory) ထဲမှာ သွားယူလိုက်ပါတယ်။ ဆိုလိုချင်တာက နေရာ တစ်ခု သွားယူလိုက်တာပါ။

ဥပမာ လူတစ်ယောက် နေထိုင်ဖို့အတွက် နေရာလွတ်တစ်ခုမှာ အိမ်ဆောက်လိုက်တဲ့ သဘောပါပဲ။ အိမ်တစ်လုံး ဆောက်လိုက်တဲ့အခါ အဲ့အိမ်မှာ လူနေလို့ ရတဲ့အပြင် အဲ့အိမ်ရဲ့ address တစ်ခုပါ ရလာတာမျိုးပါ။ ဆိုတော့ အဲ့လူကို ခေါ်ချင်ရင် အဲ့လူ နေတဲ့ နေရပ်လိပ်စာကို ထောက်လိုက်တာနဲ့ ခေါ်လို့ရသွားတာမျိုးပါ။

ဒီမှာလဲ ဒီသဘောပါပဲ။ data တစ်ခုကို ကျွန်တော်တို့ ပြန်သုံးချင်တယ်။ ပြန်သုံးဖို့အတွက် ကျွန်တော်တို့ store အရင်လုပ်ဖို့လိုတယ်။ အဲ့လို store လုပ်ဖို့အတွက် ကျွန်တော်တို့ memory (RAM) မှာ သွားသိမ်းရတယ်။ အဲ့လိုသွားသိမ်းတဲ့အခါမှာ အဲ့ဒီ့ data အတွက် memory address တစ်ခု ပြန်ရပါတယ်။ အဲ့ memory address ကို decimal value နဲ့ represented လုပ်ပါတယ်။ တကယ်တော့ သူလဲ binary တွေပါပဲ။ ကျွန်တော်တို့ variable invocation လုပ်တဲ့အခါမှာ memory address ကိုသုံးပြီး memory ထဲကနေ data ကို သွားပြန်ဆွဲထုတ်တာပါ။ ဘယ်ပေါ်ဆွဲထုတ်တာလဲဆိုတာ့ CPU ပေါ်ကို ပေါ့။ ဒီအကြောင်းကို နောက်မှ ကျွန်‌‌တော် သီးသန့် ရေးပါအုံးမယ်။

ဆိုတော့ ဒီအထိ‌တော့ ရပြီ။ variable တစ်လုံး initialization လုပ်လိုက်တာနဲ့ အဲ့ variable ရဲ့ initial value ကို memory address နဲ့ RAM ထဲသွားသိမ်းတယ်။ သိမ်းတဲ့ နေရာမှာလဲ size limit ရှိတယ်။ အဲ့တာကျ သူ့ရှေ့က data type ကို ပြန်ကြည့်ရတယ်။ ကျွန်တော်တို့ 8GB RAM တစ်ချောင်း စိုက်ထားတယ် ဆိုပါစို့။ byte အနေနဲ့ဆို 8 x 10⁹ ရှိတယ်။ အဲ့တော့ ခုနက အပေါ်မှာ ကြေညာထားတဲ့ variable "word_a" ရဲ့ data type က char။ char ရဲ့ memory size limit က 1byte (8bits) ပဲရှိပါတယ်။ အဲ့တော့ ခုနက variable အတွက်ဆို 8GB RAM ထဲက‌နေ သူဟာ memory size 1byte ပဲသွားယူ ပါလိမ့်မယ်။ အဲ့မှာမှ နောက်ထပ် char data type နဲ့ variable တစ်လုံး initialize ထပ်လုပ်ရင် နောက်ထပ် 1byte ထပ်ယူမယ်။

အဲ့တော့ ယူပြီး ဘယ်လိုသိမ်းတာလဲဆိုတဲ့ မေးခွန်းရှိပါတယ်။ ခုနက char data type variable word_a ရဲ့ initial value က "A"။ အဲ့တော့ သူ့ကို ASCII-8 အရ binary ပြောင်းရင် 01000001 ရပါတယ်။ အဲ့တော့ memory address က 1000 ထားပါတော့။ အဲ့ကျ language မှာတော့

char word_a = "A"

ဆိုပြီး ဖြစ်နေပေမဲ့ memory ထဲမှာတာ့

1000 = 01000001

ဆိုတဲ့ ပုံစံမျိုးနဲ့ သွားသိမ်းပါတယ်။ အဲ့တော့ နောက်ထပ် char data type variable တစ်လုံး initialize လုပ်တဲ့အခါ သူ့ရဲ့ memory address က 1 တိုးသွားပါတယ်။ ဘာလို့ဆို ရှေ့က char ရဲ့ memory size က 1byte ရှိတာကြောင့်ပါ။

Language
char word_a = "A";
char word_b = "B";

Memory
1000

How Mathematics are applied in Computer Science (Part -1 )Math ဟာ Computer Science မှာ အရေးကြီးတဲ့ အခန်းတစ်နေရာကနေ ပါဝင်...
01/05/2023

How Mathematics are applied in Computer Science (Part -1 )

Math ဟာ Computer Science မှာ အရေးကြီးတဲ့ အခန်းတစ်နေရာကနေ ပါဝင်နေတယ်ဆိုတာ အားလုံးလဲ သိကြပါတယ်။ Fundamental Computing ကအစ Machine Learning, AI, Data Science စတဲ့ နေရာတွေ အားလုံးမှာ Math က အဓိကနေရာကကို ပါနေတာပါ။ ဒီလို အရေးကြီးတဲ့ နေရာက ပါနေတဲ့ Math ကို ကျွန်တော်တို့ ငယ်ငယ်လေးထဲက သေချာ အချိန်ယူပြီး အခြေခံပိုင်အောင် လေ့လာခဲ့ရပါတယ်။ Simplicity ဖြစ်တဲ့ Arithmetic ကနေ explicitly ဖြစ်တဲ့ Calculus အထိကို သင်ခဲ့ရပါတယ်။ ဒါပေမဲ့ အများစုက ဒီသင်ခဲ့ရသမျှ math တွေကို ဘယ်နေရာမှာ ဘယ်လို applied လုပ်လဲဆိုတာ သိတဲ့သူတွေလဲရှိသလို မသိတဲ့သူတွေက ပိုများပါတယ်။ ဒါကြောင့် ဒီ post မှာတော့ Math ကို Computer Science မှာ ဘယ်လို applied လုပ်တယ်၊ ဘယ်နေရာမှာ applied လုပ်တယ်ဆိုတာ ပြောပြသွားမှာပါ။

Mathematics မှာ အဓိက အားဖြင့် နှစ်မျိုးခွဲလို့ရပါတယ်။ Pure Mathematics နဲ့ Applied Mathematics ပါ။ အဲ့ထဲမှာမှ Engineering, Computer Science, Physics အစရှိတဲ့ နယ်ပယ်တွေမှာ Applied Mathematics ကို သုံးကြတာများပါတယ်။ Pure Mathematics ထဲက တချို့ကိုလဲ သုံးပါတယ်။ အဲ့တော့ ဒီ Information Technology & Science field မှာ applied mathematics အများစုကို တွေ့ရမှာပါ။
Computer Science ထဲမှာ အများဆုံး သုံးတဲ့ Math အချို့ကို အရင်ချပြသွားပါမယ်။ Fundamentally အရ ဒီအောက်က Math တွေကို မသိရင် Computer Science ကို ကျွမ်းကျင်ပိုင်နိုင်မှာ မဟုတ်ပါဘူး။ (Programming/Software Engineering နဲ့ Computer Science ဆိုတာကို အရင်ကွဲလွဲစေလိုပါတယ်။ Programming ဆိုတာ Software Engineering အောက်မှာ ရှိတာဖြစ်ပြီး Software Engineering ဆိုတာ Computer Science ရဲ့ subject တစ်ခုဖြစ်ပါတယ်။)

Algebra
- Boolean Algebra
- Linear Algebra
- Abstract Algebra
- Relational Algebra
Trigonometry
Calculus
Statistics
Discrete Mathematics
Probability

ဒါတွေက Computer Science အတွက် အခြေခံအကျဆုံး Applied Mathematics တွေပဲ ရှိပါသေးတယ်။ တခြား additional field တွေ (for e.g. Machine Learning, NLP, AI, Deep Learning, Robotic) ကပ်ပါလာတဲ့အချိန်ကျရင် သူတို့နဲ့သက်ဆိုင်ရာ math တွေက တိုးလာအုံးမှာပါ။

အဲ့တော့ Math မသိပဲ Programming လုပ်လို့ရလားဆို ပေါင်းနှုတ်မြှောက်စားတောင် မတတ်ရင်တော့ မရပါဘူး။ Programming ဆိုတာသည် Computer Science အောက်မှာပဲ ရှိပြီး Computer Science ဆိုတာသည် Mathematics ခေါင်းစဉ်အောက်မှာ ရှိတာပါ။ ဒီ့အပြင် Computer ဆိုတာ Computing Machine မို့ ပေါင်းနှုတ်မြှောက်စားမှ မတတ်ရင် မလွယ်ပါဘူး။ Programming မှာတောင် အခြေခံအကျဆုံး ပေါင်းနှုတ်မြှောက်စား calculation အတွက် Arithmetic Operator ဆိုတာ ရှိထားတာ မလား။ ဒါကြောင့်မို့ Arithmetic လောက်မှ မသိရင်တော့ မရပါဘူး။ ဒါဖြင့် အပေါ်က ကောင်တွေ မသိရင်ကော ရလားဆို အတိုင်းအတာ တစ်ခုထိလောက်ပဲ ရပါမယ်။ ဆိုလိုချင်တာ Amateur Level Programmer/Developer လောက်ထိပဲ ရပါလိမ့်မယ်။ Professional level မဟုတ်တောင် Algorithms တွေလေ့လာရပါတယ်။ Algorithms တွေလေ့လာတဲ့အချိန်ကျ Algebra တွေ၊ Calculus တွေ မသိရင် ကျိန်းသေပေါက်တိုင်ပတ်မှာပါ။ Computer Scientist မပြောနဲ့ Machine Learning ဘာညာကိုတောင် အနားကပ်နိုင်မှာ မဟုတ်ပါဘူး။ ပြီးတော့ Programming မှာ တွင်တွင်သုံးနေတဲ့ Logic ဆိုတာ Boolean Algebra ကနေ လာပါတယ်။ ဒါကြောင့်မို့ အနည်းဆုံး တီးမိခေါက်မိတော့ ရှိမှ အဆင်ပြေမှာပါ။

အဲ့တော့ Computer Science ထဲမှာ Mathematics က ဘယ်လိုတွေပါဝင်ပတ်သက်နေလဲဆိုတာ အရင်ပြောပြပါမယ်။ Simple Algorithms တစ်ခုနဲ့ ဥပမာ ပြပါမယ်။ ကျွန်တော်တို့ဆီမှာ ကိန်းစဉ်တန်း တစ်ခုရှိပါမယ်။ အဲ့ကိန်းစဉ်တန်းက ပေးချက်အရ

1) sorted (order) စီပြီးသားဖြစ်ရပါမယ်။
2) ငယ်စဉ်ကြီးလိုက်ဖြစ်ရပါမယ်။
3) ကိန်းတစ်ခုနဲ့ တစ်ခုကြား ခြားနားခြင်း (၁) ဖြစ်ရပါမယ်။
4) ကိန်းစဉ်ရဲ့ စုစုပေါင်း အရေအတွက်က မ ဂဏန်းဖြစ်ရပါမယ်။

ဆိုတော့ အပေါ်က ပေးချက်တွေအတိုင်း ကျွန်တော်တို့ကိန်းစဉ်ကို array နဲ့ ဆောက်လိုက်ပါမယ်။

int array[5] = {5, 6, 7, 8, 9}

ဆိုပါစို့။ ဒီကိန်းစဉ်တန်း array ပေါ့။ Problem က ဒီကိန်းစဉ်တန်းထဲက အလယ် center ကျတဲ့ ကိန်းကိုဆွဲထုတ်ရမှာပါ။ ဆိုတော့ ဒီ့အတွက် အဖြေက ရှင်းပါတယ်။ စုစုပေါင်းကိုတည် အရေအတွက်နဲ့ စားရင် Problem solved ဖြစ်ပါတယ်။ formula ကတော့ ဒီလိုဖြစ်မှာပေါ့။

Mid = Total/Count

ဒါမဲ့ ကျနော်က ဒီ formula ကိုမသုံးချင်ဘူး ဆိုပါစို့။ ဘာလို့ မသုံးချင်လဲဆို ဒီ formula ကို applied လုပ်ဖို့အတွက် array ကို loop ပတ်ရမှာကျိန်းသေတယ်။ JavaScript မှာ reduce function နဲ့ရတယ်ဆိုပေမဲ့ C Programming လိုကောင်မျိုးမှာ loop ပတ်ကို ပတ်ရမှာပါ။ ဒီတော့ loop မပတ်ချင်တဲ့ ကျွန်တော်က ဒီ Algorithm လေး ထုတ်လိုက်ပါတယ်။ ဆုံးမှတ်ထဲက စမှတ်ကိုနှုတ်၊ ၂ နဲ့စားပြီး ရလဒ်ကို စမှတ်နဲ့ပြန်ပေါင်းရင် loop ပတ်စရာမလိုပဲ problem solved ဖြစ်ပါတယ်။

9 – 5 = 4
4 / 2 = 2
2 + 5 = 7

ဒီ Algorithm က ပေးထားချက်အတိုင်း ဆောက်ထားတဲ့ ကိန်းစဉ်တန်း array တိုင်းအပေါ် အလုပ်ဖြစ်ပါတယ်။ ဒီနေရာကနေ စပြီး Arithmetic ကိုစသုံးပါပြီ။ ဆိုတော့ ခုနက တွက်နည်းကို formula ထုတ်ကြည့်ရင်

let x = start number
let y = end number
(y - x) / 2 + x

ဆိုပြီး ရပါတယ်။ ဆိုတော့ x နဲ့ y နေရာမှာ ကြိုက်တဲ့ ကိန်းစဉ်တန်းရဲ့ စမှတ်နဲ့ ဆုံးမှတ် ကိုထည့်တွက်ရင် အဖြေထွက်ပါတယ်။ ဒီ formula ဟာ mathematics မှာဆို algebra အပိုင်းဖြစ်သွားပါပြီ။ အဲ့တော့ ဒီ Algorithm က နည်းနည်း ရှုပ်ထွေးနေတဲ့အတွက် formula ကို ချုံ့ကြည့်ပါမယ်။ ဘယ်နည်းအတိုင်းလဲဆိုတော့ Algebra နည်းအတိုင်းပါ။ ဒီနေရာမှာ Pure/Applied Mathematics ထဲက Algebra ကိုစသုံးပါပြီ။

(y - x) / 2 + x
= (y - x) / 2 + 2x / 2
= y – x + 2x / 2
= (y + x) / 2

ဆိုတဲ့ အဖြေရပါတယ်။ ဒီ formula အရ ဆုံးမှတ် y နဲ့ စမှတ် x ကိုပေါင်းပြီး ၂ နဲ့စာားရင် ခုနက Algorithm ထက် တွက်ထုတ်ရတာ ပိုတိုပြီး ပိုမြန်ပါတယ်။ တကယ်တမ်း ထည့်ကြည့်လိုက်ရင်လဲ အလုပ်ဖြစ်ပါတယ်။

(y + x) / 2
= 9 + 5 / 2
= 14 / 2
= 7

ဆိုပြီး ရပါတယ်။ ဒါကတော့ Mathematics ရဲ့ Fundamental အကျဆုံး Arithmetic နဲ့ Algebra ကို Algorithm မှာ ဘယ်လို applied လုပ်သွားလဲဆိုတာ ရှင်းပြထားတာပါ။ တကယ့်တကယ် Algorithm Calculation တွေက ဒီ့ထက် Complexity အများကြီး မြင့်ပါတယ်။ ဒီဟာက Beginner Level နားလည်လွယ်အောင် တွက်ထုတ်ပြီး ရှင်းပြထားတဲ့ Algorithm လေးပါ။

Web Developing Channel - WDC

Announcement📢==============အားလုံးပဲ မင်္ဂလာပါ။ ပြီးတော့ WDC Audience အားလုံးပဲ Happy New Year ပါလို့ နှုတ်ခွန်းဆက်လိုက်...
01/01/2023

Announcement📢
==============
အားလုံးပဲ မင်္ဂလာပါ။ ပြီးတော့ WDC Audience အားလုံးပဲ Happy New Year ပါလို့ နှုတ်ခွန်းဆက်လိုက်ပါတယ်။

WDC ရဲ့ activity တွေ freeze ဖြစ်ခဲ့တာ တော်တော်ကြာပါတယ်။ freeze ဖြစ်ခဲ့တာလဲ ကျွန်တော် ဒီ page နဲ့ ဒီ page ရဲ့ follower တွေကို ဂရုမစိုက်လို့ မဟုတ်ပါဘူး။ အမြဲတမ်းစိတ်ထဲရှိပါတယ်။ ဒါပေမဲ့ ပြဿနာက ကျွန်တော်က ဘယ်လိုမှ မအားလပ်တာပါ။ အချိန်တော်တော်များများက Schedule ပြည့်နေတာ များပါတယ်။ အဲ့လို schedule တွေ ပြည့်နေလို့လဲ social network ကနေ break ယူခဲ့တဲ့ အချိန်တွေရှိသလို လက်ရှိလဲ break ယူနေတာပါ။ WDC ရဲ့ admin ကျွန်တော် ဘယ်သူ ဆိုတာ မသိ‌သေးတဲ့သူတွေ ရှိသလို သိတဲ့သူတွေ ရှိတဲ့ အတွက်လဲ ကျွန်တော်၀မ်းသာပါတယ်။ WDC ရဲ့ activity တွေ freeze ဖြစ်နေတဲ့အချိန်မှာ page မှာရှိတဲ့ content အဟောင်းလေးတွေကို ပြန်ဖတ်ပြီး အသစ်တွေကို စောင့်နေပေးပါလို့လဲ မေတ္တာ ရပ်ခံချင်ပါတယ်။ ဒီ post က ပြီးခဲ့တဲ့နှစ်မှာ ကျွန်တော်လုပ်ခဲ့တဲ့ WDC အတွက် plan တွေနဲ့ လာမဲ့နှစ်မှာ လုပ်ဖြစ်မဲ့ plan အကြောင်းကို ပြောပြသွားမှာပါ။

2022
ပြီးခဲ့တဲ့ နှစ်မှာ ကျွန်တော့် page activities တွေကို ပုံစံတစ်မျိုးနဲ့ ပြင်ဆင်ပြီး ကျွန်တော် ဒီ WDC page ကို ပြန် run ခဲ့ပါတယ်။ Free Service တွေ Training Course တွေ စီစဉ်ပြီး page activity ကို version မြှင့်ခဲ့ပါတယ်။ အဲ့လို မြှင့်ခဲ့တဲ့ အတွက်ကြောင့်လဲ မူလ version 1 လောက်က follower 1k မပြည့်တဲ့ နေရာကနေ like & follower 6k - 7k အထိ တိုးတက်လာခဲ့ပါတယ်။ ကျွန်တော့် page ကို like & follow လုပ်ပေးကြတဲ့ သူတစ်ယောက်ချင်းစီတိုင်းကိုလဲ ကျေးဇူးတင်ပါတယ်လို့ ပြောချင်ပါတယ်။

2023
လာမဲ့ နှစ်မှာ ကျွန်တော်လုပ်မဲ့ activity တွေကို ပြောပြချင်ပါတယ်။ blog content တွေ အချိန်အားရင် အားသလို ဆက်ရေးသွားမှာပါ။ ပြီးတော့ JavaScript + JQuery Free Video Course ကို YouTube မှာ တင်ဖို့ ရှိပါတယ်။ အဲ့အတွက်လဲ Course Outline တွေ ပြင်ဆင်နေပါတယ်။

ပြီးတော့ ကြေညာစရာ တစ်ခုရှိပါတယ်။ ကျွန်တော့်ရဲ့ Service တွေထဲက တစ်ခုဖြစ်တဲ့ Training Course ဟာ (Batch - 2) ဟာ ဒီနေ့ ‌ညနေ ၄ နာရီမှာ အားလုံး ပြီးသွားပါတယ်။ Batch - 1 နဲ့ Batch - 2 ဖွင့်ခဲ့သလို တစ် batch စီတိုင်းအတွက် လူဦးရေ ၄/၅ ယောက်သာ လက်ခံပြီး Training ပေးခဲ့ပါတယ်။ အဲ့အတွက် batch အသစ် ဖွင့်တိုင်း လူပြည့်သွားလို့ နောက် batch အတွက် ကြိုတင်စာရင်းပေးရသူတွေလဲ ရှိခဲ့ပါတယ်။ အဲ့အတွက်လဲ ကျေးဇူးအများကြီး တင်ပါတယ်။

လက်ရှိ Training Course (Batch - 2) ပြီးသွားပြီ ဖြစ်တဲ့အတွက် လာမဲ့ Batch - 3 ကို စောင့်မျှော် နေတဲ့ သူတွေ ရှိပါတယ်။ ပုံမှန်ဆိုရင် Dec လလယ်လောက်မှာ batch-2 ပြီးရမှာ ဖြစ်ပေမဲ့ အကြောင်းကြောင်းကြောင့် Dec လကုန်မှ အပြီးသတ်နိုင်ခဲ့ပါတယ်။ ကြေညာစရာက လာမဲ့ Training Course (Batch - 3) ကို ကျွန်တော် postpone လုပ်မှာပါ။ ဘယ်တော့လောက်အထိ လုပ်မလဲဆိုတာ ကျွန်တော်လဲ မသေချာသေးပါဘူး။ တကယ်လို့ပြန်ဖွင့်ဖြစ်ခဲ့တယ်ဆိုရင် ကျွန်တော် ဒီ Page ကနေပဲ ကြေညာပေးသွားမှာပါ။ Postpone လုပ်ရတဲ့ အကြောင်းရင်းက Schedule ပြည့်နေတဲ့ ကျွန်တော့်အတွက် အနားယူဖို့ လိုအပ်လို့ပါ။ ပြီးတော့ ကျွန်တော့်အတွက် အာရုံစိုက်စရာ အရေးကြီး ကိစ္စတွေ ရှိလာလို့ပါ။ အဲ့အတွက် Batch- 3 အတွက် ကြိုတင် အပ်နှံထားသူများကို Batch - 3 မဖွင့်ဖြစ်သေးပဲ အချိန်အကန့်အသက်မရှိ Postpone လုပ်ထားကြောင်း ဒီနေရာကနေပဲ တောင်းပန်ချင်တာပါ။ Batch - 3 ပြန်ဖွင့်တော့မယ်ဆိုရင် ကျွန်တော် ဒီ page ကနေပဲ တစ်လကြိုတင်ကြေညာပါ့မယ်။ Training Course ရပ်နားလိုက်ရတဲ့အတွက် ဒီ post ကနေတဆင့် အားလုံးကို တောင်းပန်ပါတယ်။

Blog Content တွေနဲ့ Free Tutorial တွေကတော့ ဆက်လာမှာ ဖြစ်တဲ့အတွက် Page ကို like & follow ပြုလုပ်ထားနိုင်ပါတယ် ဆိုတဲ့အကြောင်း ဒီနေရာကနေ အသိပေးချင်ပါတယ်။

အားလုံးပဲ နှစ်သစ်မှာ ပျော်ရွှင်ကြပါစေ။ 🙏♥️


Photo Credit

Algorithms (Part - 2: Searching Algorithms)===================================Searching Algorithms တွေကတော့ data structu...
13/09/2022

Algorithms (Part - 2: Searching Algorithms)
===================================
Searching Algorithms တွေကတော့ data structures တွေထဲမှာ stored လုပ်ထားတဲ့ elements တွေကို စစ်ဖို့ ဒါမှမဟုတ် ဆွဲထုတ်ဖို့အတွက် designed ချထားတဲ့ algorithms တွေပါ။ Search လုပ်တဲ့ operation အမျိုးအစားအပေါ် မူတည်ပြီး Searching Algorithms တွေကို Sequential Search နဲ့ Interval Search ဆိုပြီး နှစ်မျိုး ခွဲလို့ရပါတယ်။

Sequential Search
------------------------------
Sequential Search ဆိုတာ Array ဒါမှမဟုတ် List ထဲမှာ ရှိတဲ့ elements တွေကို ကျော်ခွမသွားမဘဲ တစ်ခုချင်းစီ တစ်ဆင့်ချင်းစီ checking လိုက်သွားတဲ့ search algorithms မှန်သမျှကို Sequential Search အမျိုးအစားလို့ ခေါ်ပါတယ်။ ဥပမာအားဖြင့် Linear Search ဟာ Sequential Search ပါပဲ။

Interval Search
-------------------------
ဒီ Interval Search အမျိုးအစား Search Algorithms တွေကတော့ sorted လုပ်ထားတဲ့ data structures တွေမှာ Searching လုပ်ဖို့အတွက် designed ချထားတဲ့ search type အမျိုးအစားပါ။ ဒီ search-type algorithms တွေဟာ linear search လို တစ်ဆင့်စီ စစ်တဲ့ algorithms မျိုးတွေထက် search လုပ်ရတာ ပိုသွက်ပါတယ်။ ဘာကြောင့်သွက်တာလဲ ဆိုရင် သူက ရှာရမဲ့ search structures ရဲ့ center element ကို အရင်ရှာလိုက်တယ်။ ပြီးရင် အဲ့ search structures ကို နှစ်ပိုင်းခွဲချလိုက်ပြီး ရှာတဲ့ ပုံစံမျိုးတွေကြောင့် ဖြစ်ပါတယ်။ ဥပမာ အနေနဲ့ဆိုရင် Binary Search ဟာ Interval Search အမျိုးအစား Search Algorithms တစ်ခုဖြစ်ပါတယ်။

Web Developing Channel - WDC

New Blog Series is starting Now!!!
13/09/2022

New Blog Series is starting Now!!!

Algorithms (Part - 1: Introduction to Algorithms)
=======================================
Computer Science ကျောင်းသားတော်တော်များများ ဒါမှမဟုတ် Developer တော်တော်များများ Algorithm ဆိုတဲ့ စကားလုံးကိုကြားဖူးကြမယ် ထင်ပါတယ်။ လက်ရှိ Operating System Blog Series နှင့် PHP Security Blog Series ကို ရေးနေပေမဲ့လို့ တစ်ဖက်ကပြန်တွေးကြည့်တော့လဲ Computer Science Fields ထဲမှာ Programming နှင့်ဆိုင်တဲ့ မသိမဖြစ်သိရမဲ့ နောက်ထပ် Knowledge တစ်ခုလောက် Sharing လုပ်ချင်လို့ Algorithm အကြောင်းကို ထပ်ရေးဖို့ဖြစ်လာတာပါ။ ပြီးတော့ ခုတလော အလုပ်နည်းနည်းပြန်ပါးလာတော့ စာဖတ် စာရေးဖို့ အချိန်ထွက်လာတာနဲ့ နောက်ထပ် Blog Series တစ်ခုထပ်ရေးဖြစ်သွားပါတယ်။

အဲ့တော့ Algorithm ဆိုတာဘာလဲ?
Algorithm ဆိုတာ အလုပ်ကောင်းကောင်းလုပ်ပေးနိုင်တဲ့ Computational Procedures (Program) တစ်ခုပါပဲ။ ဘယ်လို အလုပ်ကောင်းကောင်း လုပ်ပေးနိုင်တာမျိုးလဲဆိုရင် တစ်ခု ဒါမှမဟုတ် တစ်ခုထက်ပိုတဲ့ Value တွေကို Input အဖြစ်ယူမယ်။ ပြီးရင် Processing လုပ်မယ်။ ပြီးရင် တစ်ခု ဒါမှမဟုတ် တစ်ခုထက်ပိုတဲ့ Value တွေကို Output အဖြစ်ပြန်ထုတ်မယ်။ ဒါပဲ။ အဲ့တော့ ပြန်ချုပ်ရရင် Input ကနေ Output ကို ပြောင်းလဲပေးတဲ့ Computational Steps Sequence ကို Algorithm လို့ခေါ်တယ်။ ဥပမာ - 1 + 1 = 2; ဒီ statement လေးတစ်ကြောင်းဟာ Algorithm ပဲ။ ဘာလို့လဲ ဆိုရင် 1 က Input ကနေ လာမယ်။ အဲ့တော့ 1 နှစ်လုံးက Input ၊ လိုချင်တဲ့ Input အကုန်ရတဲ့အခါ Processing လုပ်ရတယ်။ Statement အရ ဘာ Processing လုပ်လဲဆိုတော့ ပေါင်းတယ်။ 1 နဲ့ 1 နဲ့ ပေါင်းတဲ့ Process လုပ်လိုက်တဲ့အခါ 2 ဆိုတဲ့ Output ရလာတယ်။ အဲ့တော့ Input စတောင်းတဲ့နေရာကနေ Output ပြန်ထုတ်တဲ့ နေရာအထိ 1 + 1 = 2 ဆိုတဲ့ statement က Algorithm တစ်ခုပဲ။

နောက်တစ်နည်းအားဖြင့် Algorithm ဆိုတာ Computational Problem တွေကို ဖြေရှင်းဖို့အတွက် သုံးတဲ့ Tools အဖြစ်လဲ မှတ်ယူလို့ရတယ်။ ဥပမာ - ကျွန်တော်တို့မှာ Number Sequence တစ်ခုရှိမယ်။ အဲ့ Number Sequence ကို ငယ်စဉ်ကြီးလိုက် (Ascending Order) စီချင်တယ်။ အဲ့တော့ ရှိနေတဲ့ Random Number Sequence က Ascending Order ဖြစ်မနေတော့ အဲ့တာက Computational Problem ဖြစ်မယ်။ ဒါကို Ascending Order စီချလိုက်ရင် ဒီ Problem Solved ဖြစ်သွားမယ်။ အဲ့တော့ လိုချင်တဲ့ Solution ကို ရဖို့အတွက် ဒီ Problem ကို ဘာနဲ့ဖြေရှင်းလဲဆို Tools နဲ့ဖြေရှင်းတယ်။ ဘာ Tools လဲလို့ ထပ်မေးရင် Algorithm ပဲ။ အဲ့တော့ ရှိနေတဲ့ Computational Problem တစ်ခုကို လိုချင်တဲ့ Target Solution ရအောင် Solve လုပ်ပေးတဲ့ tools သည် Algorithm ပဲ။ ခုနက Ascending Order စီတဲ့ problem ကို Sorting Problem လို့ခေါ်ပြီးတော့ Solve ပေးတဲ့ Algorithm ကို Sorting Algorithm လို့ခေါ်တယ်။ နောက်ပိုင်း Algorithm တွေ အများကြီးကို လေ့လာရလိမ့်မယ်။

ခုနက Sorting Problem ကိုပဲဆက်ပြောမယ်။ အဲ့တော့ Problem အရ Input မှာ (843, 12, 1, 43, 73, 4, 722, 22) ရှိမယ် ဆိုပါစို့။ အဲ့တော့ ဒီ Sorting Problem ကို Sorting Algorithm နဲ့ ဖြေရှင်းလိုက်ချိန်မှာ Output က (1, 4, 12, 22, 43, 73, 722, 843) ဆိုပြီးထွက်လာမယ်။ ဒီလို Output ထွက်လာဖို့ သုံးလိုက်တဲ့ Sorting Algorithm Formula က ဒီလိုဖြစ်မယ်။ (1

အားလုံးပဲ မင်္ဂလာပါခင်ဗျာ။Web Developing Channel - WDC ရဲ့ Training Course 2 ခု ဖြစ်တဲ့ Web Design Course နဲ့ Web Develo...
09/09/2022

အားလုံးပဲ မင်္ဂလာပါခင်ဗျာ။

Web Developing Channel - WDC ရဲ့ Training Course 2 ခု ဖြစ်တဲ့ Web Design Course နဲ့ Web Development Course နှစ်ခုဟာ လာမဲ့ Oct 1 ရက်နေ့မှာ Batch2 အဖြစ် ပြန်လည်စတင် ဖွင့်လှစ်တော့မှာဖြစ်ပါတယ်။ သင်တန်းဖွင့်လှစ်ရက်ကို ဒီနေ့မှာမှ စတင်ကြေညာတာဖြစ်ပေမဲ့ Batch1 မပြီးခင် 7 လပိုင်း 8 လပိုင်းထဲက ကြိုတင်စာရင်းသွင်း အပ်နှံမှုများကြောင့် နှစ်တန်းလုံးအတွက် ကန့်သက်ထားသော လူဦးရေ ပြည့်သွားပြီဖြစ်တာကိုတော့ ၀မ်းနည်းစွာနဲ့ အသိပေးပါရစေ ခင်ဗျာ။ သို့ပေမဲ့ Batch3 အတွက် သင်တန်းအပ်နှံလိုသူများ ယခု အချိန်မှ စ၍ Page chat box မှာ လာရောက်ကြိုတင် စာရင်းသွင်းနိုင်ကြောင်း လေးစားစွာ အသိပေးအပ်ပါတယ်ခင်ဗျာ။

ယခု ဖွင့်လှစ်မဲ့ Web Design Training Course နဲ့ Web Development Training Course နှစ်တန်းရဲ့ Course outline များမှာ အောက်ပါအတိုင်း ဖြစ်ပါတယ် ခင်ဗျာ။ Batch3 အတွက် Course Outline မှာလဲ ထိုနည်းလည်းကောင်း ဖြစ်မှာဖြစ်ပြီး အပြောင်းအလဲရှိပါက အနည်းငယ်သာ ပြောင်းလဲသွားမှာ ဖြစ်ပါတယ်ခင်ဗျာ။

Web Design Training Course
========================
Duration - 2.5months
Fee - 40,000MMKs
Days & Time - 9:00AM to 12:00PM on every Saturday & Sunday
-------------------------------------------------
Course Outline
=============
- Introduction to Web Design & Development
- Fundamentals of HTML
- Fundamentals of CSS
- Practical exercises with HTML & CSS
- Responsive with CSS
- Practical Responsive Web Design Template with HTML, CSS
- Fundamentals of JavaScript
- Programming Fundamentals with JavaScript
- Procedural Programming with JavaScript
- Functional Programming with JavaScript
- Object-oriented Programming with JavaScript
- Practical exercises with JavaScript
- Practical Responsive Web Design Project with HTML, CSS & JavaScript
- Fundamentals of jQuery
- Introduction to API with AJAX & JSON
- Introduction to Bootstrap
- Practical Responsive Web Design Project with HTML, CSS, JavaScript, Bootstrap, jQuery

Web Development with PHP
=======================
Duration - 2.5months
Fee - 50,000MMKs
Days & Time - 1:00PM to 4:00PM on every Saturday & Sunday
-------------------------------------------------
Course Outline
============
- Fundamentals of PHP
- Programming Fundamentals with PHP
- Data Structures and Algorithms with PHP
- Procedural Programming with PHP
- Functional Programming with PHP
- Object-oriented Programming with PHP
- Introduction to Database Management System (DBMS)
- Fundamentals of SQL using MySQL
- Practical Web Application with PHP & SQL (Content Management System - CMS)
- Deep Learning with API
- Software Design Patterns with PHP
- MVC Design Pattern with PHP
- Practical Web Application with PHP & SQL (E-commerce Application)

Batch3 အတန်းဟာ ခန့်မှန်း January, 2023 မှာ ဖွင့်မယ်ဖြစ်နိုင်ပါတယ်ခင်ဗျ။ Batch3 အတွက် ကြိုတင်စာရင်းသွင်း အပ်နှံလိုသူများအနေဖြင့် ဤ post ကို မြင်ပြီးသည့်အချိန်မှ စ၍ ကြိုတင် စာရင်းသွင်း အပ်နှံ‌နိုင်ကြောင်း ထပ်မံအသိပေးအပ်ပါတယ်ခင်ဗျာ။ လာမည့် Batch များ၏ သင်တန်းကြေးများ အနည်းငယ် အပြောင်းအလဲ ရှိနိုင်ပါတယ်ခင်ဗျ။ Web Developing Channel - WDC ကို အား‌ထားကြတဲ့ တစ်ယောက်စီ တစ်ယောက်စီတိုင်းကို ကျေးဇူးအထူးကျေးဇူး တင်ရှိပါတယ်ခင်ဗျ။ သိပ်မကြာခင်အချိန်အတွင်းမှာ Blog Series အသစ်တစ်ခု စနိုင်အောင်လဲ ကြိုးစားနေပါတယ်ခင်ဗျ။

Web Developing Channel - WDC

Data Structure Link Collection=========================ရေးပြီးသွားပြီ ဖြစ်တဲ့ Data Structure Blog Series လေးပါ။ ဖတ်ရလွယ်...
18/08/2022

Data Structure Link Collection
=========================
ရေးပြီးသွားပြီ ဖြစ်တဲ့ Data Structure Blog Series လေးပါ။ ဖတ်ရလွယ်အောင် Link Collection လေး လုပ်ပေးထားတာပါ။

ပထမဦးဆုံးပြောချင်တာကတော့ ဒီ Blog Series ဟာ Data Structure အကြောင်းကို Perfect ဖြစ်အောင် ရှင်းပြထားတာ မဟုတ်ဘူးဆိုတာ အရင် အသိပေးပါ‌ရစေ။ ဒီ blog series ဟာ Data Structure ရဲ့ အပေါ်ယံ အနှစ်သာရလောက်ကို Beginner တွေ ဖတ်ရ လေ့လာရ လွယ်ကူအောင် ရေးပေးထားတာပါ။ ဒါကြောင့်မို့ Basic Data Structure Blog Series လို့ ခေါ်လဲ မမှားပါဘူး။

ဒီ Blog Series ကိုဖတ်လို့ Data Structure ကို သဘောလောက် နားလည်ပြီဆိုရုံနဲ့ မလုံလောက်သေးပါဘူး။ Deep Learning လုပ်ရမှာတွေ အများကြီးရှိသေးသလို Programming Language တွေကို Data Structure နဲ့ ဘယ်လို approach လုပ်ပြီး ဘယ်လို applied လုပ်ရမယ်ဆိုတဲ့ အပိုင်းကိုလဲ ကျွန်တော် ထိမ်ချန်ထားပါသေးတယ်။ အချိန်ရခဲ့ရင်လဲ အဲဒီ့အပိုင်းတွေကို ကျွန်တော် ရှင်းပြပါအုံးမယ်။

Part - 1: Introduction
https://www.facebook.com/109899280618967/posts/516311843311040/

Part - 2: Basic Data Structure
https://www.facebook.com/109899280618967/posts/517304389878452/

Part - 3: Structure & Abstract Data type
https://www.facebook.com/109899280618967/posts/518533863088838/

Problem-oriented data structure
Part - 4: List
https://www.facebook.com/109899280618967/posts/520410022901222/

Part - 5: Stack & Queue
https://www.facebook.com/109899280618967/posts/522532432688981/

Part - 6: Tree Structure (1)
https://www.facebook.com/109899280618967/posts/535806754694882/

Part - 7: Tree Structure (2)
https://www.facebook.com/109899280618967/posts/535809184694639/

Part - 8: Tree Structure (3)
https://www.facebook.com/109899280618967/posts/535815261360698/

Part - 9: Hash
https://www.facebook.com/109899280618967/posts/583431376599086/

Web Developing Channel - WDC


photo credit - google

Data Structure (Part - 9)=====================Hash-----------Hash ကို ‌array-typed data structure တွေမှာ သုံးလေ့ရှိတယ်။ ...
18/08/2022

Data Structure (Part - 9)
=====================
Hash
-----------
Hash ကို ‌array-typed data structure တွေမှာ သုံးလေ့ရှိတယ်။ ဘယ်လိုသုံးတာလဲဆိုရင် ကိုယ်လိုချင်တဲ့ data (specific data) ကို access လုပ်တဲ့အခါမှာ သုံးတယ်။ အဲ့ specific data ရဲ့ key ကို hash ပြောင်းပြီး အသုံးပြုလိုက်တာနဲ့ recorded data တစ်ခုလုံးကို တစ်ခုပြီး တစ်ခု လိုက်ဖတ်စရာမလိုပဲ ‌access လုပ်လို့ရနိုင်တယ်။

Key ကို hash address (တနည်းအားဖြင့် subscript) ကို ပြောင်းတဲ့အခါမှာ hash function တွေကို အသုံးပြူပြီး ပြောင်းရတယ်။ အများဆုံးသုံးတဲ့ hash function တွေက

1/ Division method
2/ Registration method
3/ Base conversion method တွေပဲ ဖြစ်တယ်။

Division method
----------------------------
Key ကို သေချာတဲ့ certain value တစ်ခုနဲ့ စားပြီး ရလာတဲ့ အကြွင်းကို အဲ့ key ရဲ့ hash address (subscript) အဖြစ် သုံးတာကို division method လို့ခေါ်တယ်။ ပုံမှန်အားဖြင့် ဘယ်လို certain value ကို သုံးတာလဲ ဆိုရင် စုစုပေါင်း array length နဲ့ အနီးစပ်ဆုံး prime number (သုဒ္ဓကိန်း) ကို သုံးလေ့ရှိတယ်။

E.g. Key: 1234 ဖြစ်ပြီး array ပေါင်း 100 ရှိတယ်ဆိုရင် 1234 ÷ 97 ရင် အဖြေက 12 ရပြီး အကြွင်းက 70 ရလိမ့်မယ်။ အဲ့ 70 ဟာ division method အရ 1234 ဆိုတဲ့ key ရဲ့ hash address (subscript) ပဲ။

Registration method
----------------------------------
Key တစ်ခုကို rule တစ်ခုနဲ့ ခွဲချပြီး အဲ့ ခွဲချလိုက်တဲ့ number တွေရဲ့ ပေါင်းခြင်းကို address အဖြစ် သက်မှတ်လိုက်တယ်။

E.g. Key: 1234 ကို ခွဲချလိုက်ရင် 12 နဲ့ 34 ရတယ်။ အဲ့ နှစ်ခုကို ပေါင်းရင် 12 + 34 = 46 ရတယ်။ အဲ့ 46 ဟာ registration method အရ 1234 ဆိုတဲ့ key ရဲ့ hash address (subscript) ပဲ။

Base conversion method
-----------------------------------------
Key ကို radix အနေနဲ့ ခွဲချလိုက်ပြီး သုံးထပ်ကိန်းရင်းတွေနဲ့ တွက်ထုတ်လို့ ရလာတဲ့ အဖြေကို address အဖြစ် သုံးတဲ့ နည်းပါ။

E.g. Key: 1234
(1 x 3³) + (2 x 3²) + (3 x 3¹) + (4 x 3⁰)
= 27 + 18 + 9 + 4
= 58
အဲ့ 58 ဟာ Base conversion method အရ 1234 ဆိုတဲ့ key ရဲ့ hash address (subscript) ပဲ။

Synonym
----------------
အပေါ်မှာ ပြောခဲ့သလိုပဲ key တွေကို hash function တွေသုံးပြီး hash address (subscript) တွေသက်မှတ်ကြတယ်။ အဲ့လိုသက်မှတ်တဲ့နေရာမှာ မတူညီတဲ့ key တွေရဲ့ hash address တွေဟာ တူညီသွားတတ်တယ်။ အဲ့လို တူညီတဲ့ address တွေကို synonym (collision) ဖြစ်တယ်လို့ ခေါ်တယ်။ address တူညီမှုမရှိသေးလို့ converted လုပ်လိုက်နိုင်တဲ့ record ကို home record လို့ခေါ်ပြီးတော့ address တူညီမှု‌ရှိနေလို့ converted မလုပ်လိုက်နိုင်တဲ့ record ကို synonym record လို့ခေါ်တယ်။

Synonym တွေကို အလုပ်လုပ်ဖို့ sequential method ဒါမှမဟုတ် chain method တွေနဲ့သုံးရတယ်။

Sequential method
--------------------------------
Sequential method က ကိုယ်လိုချင်တဲ့ address နားမှာ free space လေးတစ်ခုဖန်တီးပြီး အဲ့နေရာမှာ synonym record ကို သိမ်းထား‌ပေးတယ်။ ဒါပေမဲ့ ဒီလိုသိမ်းရင် chain reaction လုပ်တဲ့အခါမှာ synonym ကို ထပ်တွေ့နိုင်ချေရှိတယ်။

Chain method
-----------------------
Chain method ကျတော့ separated memory သီးသန့် ဖန်တီးပေးပြီး အဲ့နေရာမှာ synonym record ကိုသိမ်းတယ်။ အဲ့လိုသိမ်းပေးရင်တော့ အဲ့ synonym record သိမ်းတဲ့နေရာရဲ့ address ကို သိရအောင် pointer ပြန်ထောက်ပေးဖို့တော့ လိုတယ်။

Web Developing Channel - WDC

Data Structure (Part - 8)====================Perfect Binary Tree--------------------------------ဒီကောင်က ရှင်းမလိုလိုနဲ့...
05/06/2022

Data Structure (Part - 8)
====================
Perfect Binary Tree
--------------------------------
ဒီကောင်က ရှင်းမလိုလိုနဲ့ နည်းနည်းရှုပ်မယ်ထင်တယ်။ ဘယ်လိုမျိုးလဲဆိုရင် internal node တိုင်းမှာ child node 2 ခု or 0 ခု ရှိရမယ်။ အောက်ခြေ leaf တွေရဲ့ level က ကြည့်လိုက်ရင် တစ်တန်းတည်း တူညီနေရမယ်။ အဲ့လိုကောင်ကို perfect binary tree လို့ခေါ်တယ်။ ပုံမှာ ကြည့်ရင် သိနိုင်ပါတယ်။

Binary Search Tree
-------------------------------
Binary Search Tree ကိုတော့ Binary Tree ရဲ့ မူကွဲအနေနဲ့ အသုံးပြုပါတယ်။ အဓိကက သူက ရှာချင်တဲ့ data ကို binary tree ထဲမှာ ရှာတဲ့အခါ အသုံးပြုပါတယ်။ binary search tree မှာ Node တစ်ခုစီရဲ့ ဘယ်ဘယ်ခြမ်းက node တွေရဲ့ value တန်ဖိုးက တဖြည်းဖြည်း နည်းနည်းသွားပြီးတော့ ညာဘက်ခြမ်းက node တွေရဲ့ value တန်ဖိုးက တဖြည်းဖြည်း များလာတာပါ။ သူ့ရဲ့ algorithm အရဆိုရင် -

1) Root Node ကနေ စရှာမယ်။
2) ရောက်နေတဲ့ node ရဲ့ binary tree data ကို ရှာချင်တဲ့ search data နဲ့ တိုက်ကြည့်မယ်။
3) တိုက်ကြည့်လို့ တူတယ်ဆိုရင် searc လုပ်တာ အောင်မြင်တယ်လို့ သက်မှတ်လို့ရတယ်။
4) binary tree data က search data ထက် ကြီးနေရင် ဘယ်ဘက်ကို ထပ်ပြီးဆင်းရှာတယ်။
5) binary tree data က search data ထက် ငယ်နေရင် ညာဘက်ကို ထပ်ပြီး ဆင်းရှာတယ်။
6) အဲ့လိုရှာလို့မှ node တွေကုန်တဲ့အထိ child node ရှာမတွေ့ဘူးဆိုရင် search လုပ်တာ မအောင်မြင်ဘူးလို့ သက်မှတ်လို့ရပါတယ်။ ပုံမှာကြည့်ပါ။

Web Developing Channel - WDC

Data Structure (Part - 7)====================Tree Structure (4) မျိုးရှိပါတယ်။ အဲ့တာတွေကတော့ -1) Binary Tree2) Perfect B...
05/06/2022

Data Structure (Part - 7)
====================
Tree Structure (4) မျိုးရှိပါတယ်။ အဲ့တာတွေကတော့ -

1) Binary Tree
2) Perfect Binary Tree
3) Binary Search Tree
4) Balanced Tree

တို့ပဲ ဖြစ်ပါတယ်။

Binary Tree
-------------------
Tree Structure ရဲ့ basic အကျဆုံး structure လို့ပြောရင် ပိုမှန်ပါတယ်။ Child Nodes ဒါမှမဟုတ် Branches အရေအတွက်ဟာ Node တစ်ခုကနေပြီးတော့ 0 ဒါမှမဟုတ် n ကိန်း အရေအတွက်အထိ ခွဲဖြာဆင်းသွားတဲ့ structure ကို N-ary tree လို့ခေါ်ပါတယ်။ ပုံမှန်အားဖြင့်ဆို ရိုးရိုး tree structure ပေါ့ဗျာ။ root node တစ်ခုထဲကနေ တဖြည်းဖြည်း branch တွေခွဲ child node တွေများလာတာမျိုးကို ဆိုလိုတာပါ။

အဲ့ဒီ N-ary tree တစ်ခုမှာမှ အများဆုံး branches 2 ခု (n=2) ရှိရင် (သို့မဟုတ်) Child Node နှစ်ခု (or) တစ်ခု (or) တစ်ခုမှ မရှိတဲ့ tree ကို Binary Tree လို့ခေါ်ပါတယ်။ နှစ်ခုထက်ပိုတဲ့ branches တွေရှိတဲ့ tree ကိုကျ multiway tree လို့ခေါ်ပါတယ်။
Binary Tree data မှာ Data Section တစ်ခုနဲ့ Pointer Section နှစ်ခုပဲ ပါ၀င်ပါတယ်။ structure အရ -

Left Pointer Section - Data Section - Right Pointer Section

အနေနဲ့ တည်ရှိပါတယ်။ data section မှာတော့ ထုံးစံအတိုင်း data ကို store လုပ်ပါတယ်။ left pointer section မှာတော့ ဘယ်ဘက်ကို branch off လုပ်ပြီး ချိတ်ဆက်ထားတဲ့ child node ရဲ့ position ကို store လုပ်ပြီးတော့ right pointer section မှာတော့ ညာဘက်ကို branch off လုပ်ပြီး ချိတ်ဆက်ထားတဲ့ child node ရဲ့ position ကို store လုပ်ထားပါတယ်။

Binary Tree ကို search လုပ်ပြီး trace လိုက်ဖို့အတွက် နည်းလမ်း သုံးခုရှိပါတယ်။ အဲ့ နည်းလမ်း သုံးခုကို ဒီတိုင်းရေးပြတာဖတ်ရင် နားလည်မှာ မဟုတ်ပါဘူး။ ပုံနှင့်တွဲကြည့်ပြီး လေ့လာပါ။

Pre-order
----------------
Root node ကနေစတယ်။ ဘယ်ဘက်အစွန်ဆုံးမှာ ရှိတဲ့ node တွေကို တစ်ခုစီ track လုပ်သွားတယ်။ ဒီလို search လုပ်တဲ့နည်းကို Pre-order လို့ခေါ်ပါတယ်။

Mid-order (or) In-order
------------------------------------
ဘယ်ဘက် အစွန်ဆုံး node ကနေစတယ်။ node တစ်ခုဆီရဲ့ အောက်ဖက် child node တွေကို တစ်ခုစီ track လုပ်သွားတယ်။ track လုပ်စရာ child node မရှိတော့ရင် parent node ကိုတက် track တယ်။ ဒီနည်းကို mid-order (or) In-order လို့ခေါ်ပါတယ်။

Post-order
-----------------
ဘယ်ဘက်အစွန်ဆုံး node ကနေပဲစတယ်။ ညာဘက်အစွန်ဆုံးက node တွေကို တစ်ခုစီ track လုပ်သွားတယ်။ root node ကို နောက်ဆုံးမှ track တယ်။ Pre-order ရဲ့ ပြောင်းပြန်ပါ။ ဒီနည်းကို post-order လို့ခေါ်ပါတယ်။

[Note: ပုံအောက်က traversal ကိန်းတန်းက order အရ ပြန်စီပေးထားတဲ့ ကိန်းစဉ်တန်းဖြစ်ပါတယ်။ လေ့လာကြည့်ပါ။]

Web Developing Channel - WDC

Address

Yangon
Yangon
11041

Alerts

Be the first to know and let us send you an email when Web Developing Channel - WDC posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share