How is O(N) algorithm also an O(N^2) algorithm? | Solution
"Upper bound" means the algorithm takes no longer than (i.e. <=) that long (as the input size tends to infinity, with relevant constant factors considered).
It does not mean it will ever actually take that long.
Something that's O(n) is also O(n log n), O(n2), O(n3), O(2n) and also anything else that's asymptotically bigger than n.
If you're comfortable with the relevant mathematics, you can also see this from the formal definition.
Hi, I’m Vijay Chauhan, a web developer from India in love with all things internet. Online since 2015.
Subscribe to:
Post Comments (Atom)
SQL Server — Core Concepts with examples
Data Definition Language (DDL) : CREATE , ALTER , DROP (tables, views, procedures, triggers). Data Manipulation Language (DML) : SELECT ,...
Best for you
-
Here You can check how to share domain with Local Storage and Session Storage hare data between multiple domains (for example an auth toke...
-
A JSON Web Token (JWT) is a way to securely transmit information between two parties, like a server and a client. Here’s how it works in si...
-
Introduced in ES6 version, generator functions are a special class of functions. They can be stopped midway and then continue from where i...
-
Data Definition Language (DDL) : CREATE , ALTER , DROP (tables, views, procedures, triggers). Data Manipulation Language (DML) : SELECT ,...
-
1. Basic .NET Concepts What is the .NET Framework ? A software framework by Microsoft that provides a runtime (CLR) and libraries for b...
-
You might want to try gitsh. From their readme: The gitsh program is an interactive shell for git. From within gitsh you can issue any gi...
-
If you enable GZIP compression in Apache web server, then it will compress data while sending responses, improve website speed & perfo...
-
For making MailWatch work with Debian 11 and PHP 8, I had Fixed few code-file to avoid error : PHP Fatal error: Array and string offset ac...
No comments:
Post a Comment