Algorithm တွေ Data Structure တွေ လေ့လာရင် ဘာတွေလိုလဲ။
၁ အလွတ်ကျက်ဖို.မလိုဘူး စာအုပ်ထဲမှာ ပါမှာပဲ algorithm ဆိုတာ pseudo code ပါမယ် အဲ့တာကို လုပ်ရမှာက programming language နဲ. implement လုပ်နိုင်ဖို. မလုပ်နိုင်လဲ reference implementation တွေသုံးလို.ရတယ်။
၂ Basic Mathematical notation တွေကို နားလည်ရပါလိမ့်မယ်။ ဥပမာ Set ကို ဘယ်လိုရေးလဲ array ကိုဘယ်လိုရေးလဲ Vector ကိုဘယ်လို တွေရေးလဲ variable စာလုံး အထူအပါး အကြီးအသေးအပေါ်တောင် လိုက်ပြီး notation ကွာပါတယ်။ ဒါတွေသိဖို.လိုတယ်။
၃ Algorithm တခုချင်းက ဘယ်လို problem တွေကို solve လုပ်တာလဲ ဘယ်လို requriement တွေရှိသလဲ။ ဥပမာ ဟိုနေ.ကပြောတဲ့ binary search ဆို sorted လုပ်ပြီးသား array ကိုပဲ ရှာလို.ရမယ်။ ဒါသည် requirement ပေါ့။ Binary Search ဆိုဘာကောင်းလဲ ရှာရလွယ်တယ်။ နောက် ကိုသုံးမဲ့ algorithm or Data Structure သည် time အတွက်ကောင်းတာလား space အတွက်ကောင်းတာလား။ ဥပမာ တချို. algorithm တွေ ဥပမာ compression algorithm တွေသည် အဓိက နေရာသက်သာချင်တာ။
၄ ကို. application domain က ဘယ်လို characteristic တွေများလဲ ဥပမာ random access လုပ်ချင်တာလား။ Hash table လိုကောင်မျိုးဆို access time မြန်မယ်။ Index အရ ထောက်ချင်တာလား ဒါဆို array လိုကောင်မျိုး။ Key Value အရ ထုတ်ချင်တာလား ဒါဆို HashMap လိုကောင်မျိုး။
၅။ နောက်တခုက ဘယ်လိုအခြေအနေတွေများနိုင်သလဲ။ ဥပမာ worst case က ဘာတွေဖြစ်မလဲ load ဘယ်လောက်များမလဲ ဒါတွေကို algorithm က ခံနိုင်လား ပေးနိုင်လား။
၆ နောက်ဆုံး ကို. algorithm သည် large scale လုပ်ရတော့မယ် data အကြီးကြီး handle လုပ်ရတော့မယ်ဆိုရင်တောင် parallel algorithm အနေနဲ. သုံးလို.ရမလား ဥပမာ map reduce လိုကောင်မျိုးသုံးပြီးတော့။
၇ ဘယ် algorithm သည် time complexity ဘယ်လောက်ရှိလဲ မဖြစ်မနေသိရမယ်။ ဘယ်လိုအခြေအနေ worst case မှာဆို ဘယ်လောက်ရှိသလဲ။
၈ နောက် ကိုသုံးမဲ့ algorithm သည် ကို implement လုပ်မဲ့. language အနေနဲ. ကိုက်ရဲ.လား ဥပမာ pointer သုံးပြီး လုပ်ရတဲ့ algorithm မျိုး memory မှာ pointer arithmetic သုံးရမယ်ဆိုရင် C/C++ လုပ်တာ ပိုကောင်းတယ်။
Original link