Guilan Faculty of Engineering
Hesam Haddad

Today we are going to be talking about the Importance of Algorithms in Programming and providing their usage, optimization after definitions.
The main propose of this is to help you have a clear view of algorithms or some basic knowledge.


What’s An Algorithm?
Algorithms are sets of rules to be followed in calculation or other problem solving by computer.


Runtime Analysis
After The correctness of an algorithm to solve all the test cases, the most important thing is runtime.
Computer Scientists typically talk about the runtime relative to the size of input. If the input consists of N integers, an algorithm witch has a runtime proportion to N2 represent as O(N2) means that this algorithm terminate and complete after doing N2 operations.

ادامه مطلب


سلام دوستان سوالی که امروز براتون انتخاب کردم یه سوال از مسابقه DM Contest سایت Sharecode.ir هستش که چند هفته پیش برگذار شد منبع اصلیش   Mid-Atlantic 2004 هستش ... این مسئله خیلی وقت منو گرفت چون هربار سعی کردم جواب بهتری واسش ارائه بدم ... در آخر هم از سایت ShareCode.ir و سایت poj.org واسه این راه حل Accept گرفتم ولی سایت ICPC Live Archive به کد Wrong Answer داد .

خب ابتدا سوال رو مطالعه کنید

ادامه مطلب