In this talk we'll look at simple building-block techniques for predicting metrics over time based on past data, taking into account trend, seasonality and noise, using Python with Tensorflow.
In this talk we'll look at simple building-block techniques for predicting metrics over time based on past data, taking into account trend, seasonality and noise, using Python with Tensorflow.
Result processing is a part of the post-examination process that needs accuracy and transparency as the betterment of students is based on their report card and grade history.
The presentation starts from Data Extraction & then moves to Structured Data Extraction. Two approaches like Wrapper Induction & Automatic Extraction are also well explained in these slides.
Background: I've to give a small presentation on this topic as a part of my University curriculum (3rd year Engineering) and I decided to publish it on Slideshare so others can find it useful.
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Daniel Zivkovic
Two #ModernDataStack talks and one DevOps talk: https://youtu.be/4R--iLnjCmU
1. "From Data-driven Business to Business-driven Data: Hands-on #DataModelling exercise" by Jacob Frackson of Montreal Analytics
2. "Trends in the #DataEngineering Consulting Landscape" by Nadji Bessa of Infostrux Solutions
3. "Building Secure #Serverless Delivery Pipelines on #GCP" by Ugo Udokporo of Google Cloud Canada
We ran out of time for the 4th presenter, so the event will CONTINUE in March... stay tuned! Compliments of #ServerlessTO.
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
More Related Content
Similar to Data structure and algorithm Chapter_1.pdf
Result processing is a part of the post-examination process that needs accuracy and transparency as the betterment of students is based on their report card and grade history.
The presentation starts from Data Extraction & then moves to Structured Data Extraction. Two approaches like Wrapper Induction & Automatic Extraction are also well explained in these slides.
Background: I've to give a small presentation on this topic as a part of my University curriculum (3rd year Engineering) and I decided to publish it on Slideshare so others can find it useful.
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Daniel Zivkovic
Two #ModernDataStack talks and one DevOps talk: https://youtu.be/4R--iLnjCmU
1. "From Data-driven Business to Business-driven Data: Hands-on #DataModelling exercise" by Jacob Frackson of Montreal Analytics
2. "Trends in the #DataEngineering Consulting Landscape" by Nadji Bessa of Infostrux Solutions
3. "Building Secure #Serverless Delivery Pipelines on #GCP" by Ugo Udokporo of Google Cloud Canada
We ran out of time for the 4th presenter, so the event will CONTINUE in March... stay tuned! Compliments of #ServerlessTO.
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...kalichargn70th171
A dynamic process unfolds in the intricate realm of software development, dedicated to crafting and sustaining products that effortlessly address user needs. Amidst vital stages like market analysis and requirement assessments, the heart of software development lies in the meticulous creation and upkeep of source code. Code alterations are inherent, challenging code quality, particularly under stringent deadlines.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
2. Chapter contents
▪Introduction to Data structures
✓Classification of data structure
✓Abstract Data Types
✓Abstraction
▪Algorithms
✓Properties of algorithms
✓Algorithm Analysis Concept
✓Complexity Analysis
▪Asymptotic analysis
2
3. Introduction
▪What is Data Structure?
✓It is a set of procedures to define, store, access and manipulate data
✓It is the organized collection of data
✓It is the logical or mathematical model of a particular organization
of data
▪ Program = Data Structure + Algorithm
✓Data Structure is the way data is organized in a computer’s memory so
that it can be used effectively and efficiently.
✓Algorithm is the sequence of computational steps to solve a problem.
▪Data Structure is a language construct that the programmer has
defined in order to implement an abstract data type.
3
4. The easiest way to understand DS
▪Let’s understand Data structure with the help of real Life
▪Examples:
✓In dictionary, words are arranged alphabetically in a dictionary.
You can quickly and efficiently search and discover a term.
✓A business cash-in-cash-out statement. Much as certain data
structures, it is straightforward to aggregate and extract data in
orderly columns.
4
5. Why Data Structure is Important?
▪Data structures organize data => more efficient programs.
▪ More powerful computers => more complex applications.
▪ More complex applications demand more calculations.
▪ Complex computing tasks are unlike our everyday experience
▪ The choice of data structure and algorithm can make the
difference between a program running in a few seconds or many
days.
▪ You can not do anything without data on the world.
5
6. Why Data Structure is Important?
▪ Computer Science deal with storing, organizing and retrieving data
effectively.
▪ Computer Programmer should get data from user or another sources and use
them.
▪ It is essential ingredient in creating fast and powerful algorithms.
▪ For this purpose you have to use data structure for every software program or
system.
▪ Each data structure has costs and benefits.
▪ Rarely is one data structure better than another in all situations.
▪ A data structure requires:
✓Space for each data item it stores,
✓Time to perform each basic operation,
✓Programming effort.
6
7. Classifications Data Structure
▪ There are two types of data structure available for the programming purpose:
✓Primitive data structure: is a fundamental type of data structure that stores the data of
only one type .
✓Non-primitive data structure: is a type of data structure which is a user-defined that
stores the data of different types in a single entity.
7
8. Abstraction
▪ It is an abstraction of a data structure that provides only the interface to
which the data structure must adhere.
▪ The interface does not give any specific details about something should be
implemented or in what programming language.
▪ Abstraction: It is a technique of hiding the internal details from the user and
only showing the necessary details to the user.
▪ Encapsulation: It is a technique of combining the data and the member
function in a single unit is known as encapsulation.
8
9. What is Abstract Data Type?
▪An Abstract Data Type is composed of:
✓A collection of data / set of values
✓A set of operations on data
▪Specification of ADT indicate
✓What the ADT operations do, not how to implement them
▪Implementation of an ADT
✓Includes choosing a particular data structure
✓DS is a constructor that can be defined in a programming language to
store a collection of data.
9
10. What is ADT?
▪ADT consists of an abstract data structure and operations
▪Specifies:
✓What can be stored in the ADT
✓What operations can be done on/by the ADT
▪E.g. if we are going to model employees of an organization:
✓ADT stores employees with
• their relevant attributes and
• discarding irrelevant attributes.
✓ADT supports
• hiring, firing, retiring, … operations.
▪ An ADT tells what is to be done and data structure tells how it is to be
done.
▪ In other words, we can say that ADT gives us the blueprint while data
structure provides the implementation part.
10
12. What is ADT?
▪There are lots of formalized and standard Abstract data types
✓such as Stacks, Queues, Trees, etc.
12
13. What is Algorithm?
▪It is a process or a set of rules required to perform calculations or
some other problem-solving operations especially by a computer.
▪The formal definition:
✓It contains the finite set of instructions which are being carried in a
specific order to perform the specific task.
✓It is not the complete program or code; it is just a solution (logic) of a
problem, which can be represented either as an informal description
using a Flowchart or Pseudocode.
13
14. Properties of an Algorithm
▪ The following are the characteristics of an algorithm:
✓ Input
✓ Output
✓ Finiteness
✓ Definiteness
✓ Sequence
✓ Feasibility
✓ Correctness
✓ Language Independent
14
15. Why do we need Algorithms?
▪We need algorithms because of the following reasons:
✓Scalability:
• It helps us to understand the scalability.
• When we have a big real-world problem, we need to scale it down into small-
small steps to easily analyze the problem.
✓Performance:
• The real-world is not easily broken down into smaller steps.
• If the problem can be easily broken into smaller steps means that the problem is
feasible.
15
16. Importance of Algorithms
▪Theoretical importance:
✓When any real-world problem is given to us and we break the problem into
small-small modules.
✓To break down the problem, we should know all the theoretical aspects.
▪Practical importance:
✓As we know that theory cannot be completed without the practical
implementation.
✓So, the importance of algorithm can be considered as both theoretical and
practical.
▪Issues of Algorithms
▪ The following are the issues that come while designing an algorithm:
✓How to design algorithms
✓How to analyze algorithm efficiency
16
17. Algorithm Analysis Concept
▪ It refers to the process of determining the amount of computing time and
storage space required by different algorithms.
▪ It is a process of predicting the resource requirement of algorithms in a
given environment.
▪ Main resources are:
✓Running Time
✓Memory Usage
✓Communication Bandwidth
17
18. Algorithm Analysis
▪The algorithm can be analyzed in two levels
✓First is before creating the algorithm and
✓Second is after creating the algorithm.
▪ The following are the two analysis of an algorithm:
✓Priori Analysis:
• Theoretical analysis of an algorithm which is done before implementing
the algorithm. Various factors can be considered before implementing the
algorithm like processor speed, which has no effect on the implementation
part.
✓Posterior Analysis:
• practical analysis of an algorithm.
• The practical analysis is achieved by implementing the algorithm using any
programming language.
• This analysis basically evaluate that how much running time and space
taken by the algorithm.
18
19. Complexity Analysis of Algorithm
▪ Complexity Analysis of Algorithm is the systematic study of the cost of
computation measured either:
✓in time units or
✓in operations performed, or
✓in the amount of storage space required
▪ The goal is to have a meaningful measure that permits comparison of
algorithms independent of operating platform.
19
20. Complexity Analysis of Algorithm
▪The performance of the algorithm can be measured in two factors:
✓Time complexity:
• The amount of time required to complete the execution.
• Is denoted by the big O notation. Here, big O notation is the asymptotic
notation to represent the time complexity.
• Is mainly calculated by counting the number of steps to finish the
execution.
✓Space complexity:
• The amount of space required to solve a problem and produce an output.
• Similar to the time complexity, space complexity is also expressed in big O
notation.
20
21. How to measure the efficiency of algorithms?
▪There are two approaches, Empirical & Theoretical.
▪Empirical:
✓competing algorithms and trying them on different instances.
▪Theoretical:
✓Determining the quantity of resources required mathematically
(Execution time, memory space, etc.) needed by each algorithm
▪However, it is difficult to use actual clock-time as a consistent
measure of an algorithm‘s efficiency, because clock-time can vary
based on many things. For example:
✓Specific processor speed, Current processor load
✓Specific data for a particular run of the program (Input Size, Input
Properties)
✓Operating Environment 21
22. Cont...
▪An algorithm’s performance depends on internal and external
factors.
▪Internal:
✓The algorithm’s efficiency, in terms of:
• Time required to run
• Space (memory storage) required to run
▪External:
✓The algorithm’s efficiency, in terms of:
• Size of the input to the algorithm
• Speed of the computer on which it is run
• Quality of the compiler
22
23. Cont...
▪What metric should be used to judge performance of an algorithms?
✓Length of the program (lines of code)
✓Ease of programming (bugs, maintenance)
✓Memory required
✓Running time
▪Running time is the dominant standard.
✓Quantifiable and easy to compare
▪An algorithm may run differently depending on:
✓The hardware platform (PC, processor speed)
✓The programming language (C, Java, C++)
✓The programmer (you, me)
23
24. Phases of Complexity analysis
▪Complexity analysis involves two distinct phases.
▪Algorithm Analysis:
✓Analysis of the algorithm or data structure to produce a function T(n)
that describes the algorithm in terms of the operations performed in order
to measure the complexity of the algorithm.
▪Order of Magnitude Analysis:
✓Analysis of the function T(n) to determine the general complexity
category to which it belongs.
24
25. Complexity analysis Rules
▪We assume an arbitrary time unit.
▪Execution of one of the following operations takes time 1:
✓Assignment Operation
✓Single Input/output Operation
✓Single Boolean Operations
✓Single Arithmetic Operations
✓Function Return
25
26. Cont...
▪Running time of a selection statement (if, switch)is:
✓The time for the condition evaluation + The maximum of the running times
for the individual clauses in the selection.
▪Loops:
✓Running time for a loop is equal to:
• The running time for the statements inside the loop * number of iterations.
✓The total running time of a statement inside a group of nested loops is:
• The running time of the statements multiplied by the product of the sizes of all
the loops.
✓For nested loops, analyze inside out.
✓Always assume that the loop executes the maximum number of iterations
possible.
▪Running time of a function call is:
✓1 for setup + the time for any parameter calculations + the time required
for the execution of the function body.
26
27. Example
27
void func()
{
int x=0;
int i=0;
int j=1;
cout<<"Enter an Integer value";
cin>>n;
while (i<n)
{ x++;
i++;
}
while (j<n)
{ j++;
}
}
Time Units to Compute
-------------------------------------------------
1 for the first assignment statement: x=0;
1 for the second assignment statement: i=0;
1 for the third assignment statement: j=1;
1 for the output statement.
1 for the input statement.
In the first while loop:
n+1 tests
n loops of 2 units for the two increment (addition)
operations
In the second while loop:
n tests
n-1 increments
-------------------------------------------------------
T (n)= 1+1+1+1+1+n+1+2n+n+n-1 = 5n+5 = O(n)
29. Asymptotic Analysis
▪While checking the running time for any algorithm, we want three
things:
✓The algorithm should be machine-independent.
✓It should work on all possible inputs.
✓It should be general and not programming language-specific.
▪However, we never do accurate analysis, rather we do approximate
analysis. We are interested in the increase in the running time with
the increase in the input size.
▪Thus, we are only interested in the ‘growth of the function’, which
we can measure/analyses through asymptotic analysis.
29
30. Asymptotic Analysis
▪The term asymptotic means approaching a value or curve
arbitrarily closely (i.e., as some sort of limit is taken).
▪Asymptotic analysis:
✓It is a general methodology to compare or to find the efficiency of any
algorithm.
✓We measure the efficiency in terms of the growth of the function.
• The growth of any function depends on how much the running time is increasing
with the increase in the size of the input.
▪Asymptotic analysis of an algorithm refers to defining the
mathematical boundary of its run-time performance.
30
31. Asymptotic Analysis
▪The time required by an algorithm falls under three types.
✓Best Case:
• Minimum time required for program execution.
✓Average Case:
• Average time required for program execution.
✓Worst Case
• Maximum time required for program execution.
31
32. Asymptotic Notation
▪Asymptotic Notation:
✓Whenever we want to perform analysis of an algorithm, we need to
calculate the complexity of that algorithm.
✓But when we calculate the complexity of an algorithm it does not provide
the exact amount of resource required.
✓So instead of taking the exact amount of resource, we represent that
complexity in a general form (Notation) which produces the basic nature
of that algorithm.
✓We use that general form (Notation) for analysis process.
✓So asymptotic notation is a language that allow us to analyze an
algorithm's running time by identifying its behavior as the input size for
the algorithm increases.
✓It is a mathematical representation of its complexity.
32
33. Asymptotic Notation
▪In asymptotic notation:
✓When we want to represent the complexity of an algorithm, we use only
the most significant terms in the complexity of that algorithm and ignore
least significant terms in the complexity of that algorithm
• Here, complexity can be Space Complexity or Time Complexity.
▪Example: T(n) = ck nk + ck-1 nk-1 + ck-2 nk-2 + … + c1n + co
✓too complicated
✓too many terms
✓Difficult to compare two expressions, each with 10 or 20 terms
▪Do we really need that many terms?
33
34. Asymptotic Notation
▪ Keep just one term!
✓the fastest growing term (dominates the runtime)
▪ No constant coefficients are kept
✓Constant coefficients affected by machines, languages, etc.
▪ Asymptotic behavior (as n gets large) is determined entirely by the leading
term.
✓Example. T(n) = 10n3 + n2 + 40n + 800
• If n = 1,000, then T(n) = 10,001,040,800
• error is 0.01% if we drop all but the n3 term leading term.
34
36. Asymptotic Notation
▪Big-Oh Notation (O):
✓is used to define the upper bound of an algorithm in terms of Time
Complexity.
✓is always indicates the maximum time required by an algorithm for all
input values.
✓is describes the worst case of an algorithm time complexity.
▪Consider function f(n) as time complexity of an algorithm and g(n)
is the most significant term.
✓If f(n) <= c.g(n) for all n >= n0, c > 0 and n0 >= 1.
✓Then we can represent f(n) as O(g(n)).
✓f(n)=O(g(n))
36
37. Asymptotic Notation
▪ Example:
▪ Consider the following f(n) and g(n)
✓f(n) = 3n + 2
✓g(n) = n
▪ If we want to represent f(n) as O(g(n)) then it must satisfy
✓f(n) <= c.g(n) for all n >= n0, c > 0 and n0 >= 1
✓f(n) <= c.g(n) ⇒3n + 2 <= cn
▪ Above condition is always TRUE for all values of
✓c = 4 and n >= 2.
▪ By using Big - Oh notation we can represent the time complexity as follows...
✓3n + 2 = O(n)
37
38. Asymptotic Notation
▪Big-Omega Notation (Ω):
✓ is used to define the lower bound of an algorithm in terms of Time
Complexity.
✓is always indicates the minimum time required by an algorithm for all
input values.
✓describes the best case of an algorithm time complexity.
▪Consider function f(n) as time complexity of an algorithm and g(n)
is the most significant term.
✓If f(n) >= c.g(n) for all n >= n0, c > 0 and n0 >= 1.
✓Then we can represent f(n) as Ω(g(n)).
✓f(n) = Ω(g(n))
38
39. Asymptotic Notation
▪ Example:
▪ Consider the following f(n) and g(n)
✓f(n) = 3n + 2
✓g(n) = n
▪ If we want to represent f(n) as Ω(g(n)) then it must satisfy
✓f(n) >= c.g(n) for all values of c > 0 and n0>= 1
✓f(n) >= c.g(n) ⇒3n + 2 >= C n
▪ Above condition is always TRUE for all values of
✓c = 1 and n >= 1.
▪ By using Big - Omega notation we can represent the time complexity as
follows
✓3n + 2 = Ω(n)
39
40. Asymptotic Notation
▪Big-Theta Notation (Θ):
✓is used to define the average bound of an algorithm in terms of Time
Complexity.
✓is always indicates the average time required by an algorithm for all input
values.
✓is describes the average case of an algorithm time complexity.
▪Consider function f(n) as time complexity of an algorithm and g(n)
is the most significant term.
✓If c1.g(n) <= f(n) <= c2. g(n) for all n >= n0, c1 > 0, c2 > 0 and n0 >= 1.
✓Then we can represent f(n) as Θ(g(n)).
✓f(n) = Θ(g(n))
40
41. Asymptotic Notation
▪ Example:
▪ Consider the following f(n) and g(n).
✓f(n) = 3n + 2
✓g(n) = n
▪ If we want to represent f(n) as Θ(g(n)) then it must satisfy
✓c1.g(n) <= f(n) <= c2.g(n) for all values of c1 > 0, c2 > 0 and n0>= 1
✓c1.g(n) <= f(n) <= c2.g(n) ⇒ c1n <= 3n + 2 <= c2n
▪ Above condition is always TRUE for all values of
✓c1 = 1, c2 = 4 and n >= 2.
▪ By using Big - Theta notation we can represent the time complexity as
follows.
✓3n + 2 = Θ(n)
41