A Perfect Algorithm!

Post #02

algorithm is not just an approach to solve a problem but to solve them “efficiently”. Efficiency here means, your code must be acceptable for minimum outcome of time and space factor

We write some codes to solve some logical problem and start calling it an “Algorithm” that’s incomplete

Ask yourself:

would you call something an algorithm which obviously let’s you achieve some feature but eats all system resources ?

Well! I got some tips ⤵️

1️⃣ paper pen all steps you can think which leads the final output

2️⃣ always follow networking OSPF method(open shortest path first)

3️⃣ examine all steps you created and start re-examining all of them keeping “performance” in mind

4️⃣ calculate how much time and space those steps require to perform one transaction successfully

5️⃣ filter out best case, average case and worst case based on step 4 and go with “best case” always

And happy coding then

You dont need special programming. you can use any programming language which you feel comfortable with

Thanks for reading

原文链接:A Perfect Algorithm!

© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
If you don’t try, you’ll never know. So try.
如果你不去试,你永远也不知道结果,所以去试试吧
评论 抢沙发

请登录后发表评论

    暂无评论内容