Algorithm Complexity
Algorithm Complexity
Time complexity:- the amount of time and algorithm needs to do a task is referred
to as time complexity. It is usually measured by number of operations or steps and
algorithm must perform to solve a problem. The time complexity of an
algorithm is important because it determines how long it takes to execute and can
have a significance impact on program and system performance. The time
complexity can be expressed by O(big O) for upper bound or worst case time
complexity theta for average case time complexity and omega for lower bound or
best case time complexity.
Space complexity:- the space complexity refers to the amount of memory or storage
space required to execute the algorithm. This is important because it determines
the number of resources required to run algorithm that can affect the overall
performance of your application or system.
Advantages of algorithm:-
Speed and efficiency:- algorithm can processes large amount of data quickly and
accurately making them useful for task that are too time consuming or error prone
for peoples to perform.
Consistency :- algorithm follow a set of pre determine guidelines it can produce
consistent result without being influenced by personal biases and emotions.
Automation:- algorithms can perform task automatically leaving people free to focus
on more complex or creative task.
Increased accuracy :- algorithms can often achieve higher level of accuracy than
humans specially when dealing with large amount of data.
Better decision making:- algorithm help us make more informed and objective
decisions by analyzing data and identifying patterns and trends that are not easily
visible to the people.
Scalability:- algorithms can be easily scaled up and down to meet changing demand
and work loads.
Disadvantages of algorithm:-
Limited scope:- algorithm can only solve the problem within there scope and may
not be able to solve complex or abstract problems.
Insufficient transparency:- many algorithm conceal the process through which they
arrive at there conclusions, this could make it tough to think about or check the
result.
Reliability on finesse of data:- the algorithms are Highly dependent on the specific
formatted data which are fine to that algorithm they are not designed for
unformatted data.