{"id":186403,"date":"2023-12-11T14:16:00","date_gmt":"2023-12-11T14:16:00","guid":{"rendered":"https:\/\/www.henryharvin.com\/blog\/?p=186403"},"modified":"2023-12-19T12:30:44","modified_gmt":"2023-12-19T12:30:44","slug":"big-o-notation-in-data-structure","status":"publish","type":"post","link":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/","title":{"rendered":"Introduction to Big O Notation in Data Structure"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Big O Notation in data structure is mainly used in the field of mathematics and computer science. It informs us of an algorithm\u2019s performance in a given situation. The term \u201cAlgorithm\u201d sounds like a complicated mechanism. But in simple terms, it is a set of instructions to be followed in a sequence to arrive at an output. The need to apply algorithms arose on account of the voluminous data the company has to deal with on a daily basis. <\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"225\" height=\"225\" src=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15172339\/Algorithm.jpeg\" alt=\"Big O notation in data structure\" class=\"wp-image-186404\" srcset=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15172339\/Algorithm.jpeg 225w, https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15172339\/Algorithm-150x150.jpeg 150w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><\/figure><\/div>\n\n\n\n<p>Algorithms have brought about a revolutionary change in this competitive digital world. The Big O notation in data structure helps to identify the most efficient algorithm as a solution to the problem.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is big O notation in data structure?<\/h2>\n\n\n\n<p>Big O Notation in data structure is an advanced mathematical notation to define the efficiency of an algorithm. The letter \u201cO\u201d stands for \u201cOrder of\u201d. The computer executes it in a step-by-step manner. It accepts an input and converts it into an output. So, O(N) stands for \u201cOrder of N\u201d in which N represents the input size. It states the number of steps an algorithm takes in accordance to the size of input.<\/p>\n\n\n\n<p>All the companies are dealing with some problems. In order to solve them, the companies list out various steps. These steps are called algorithms. These problems might have multiple solutions in the form of several algorithms. So, the challenge lies in picking-up the best solution that saves time and occupies less memory. This is termed as Algorithm analysis.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15172910\/images.jpeg\" alt=\"Big O notation in data structure\" class=\"wp-image-186405\" \/><\/figure><\/div>\n\n\n\n<p>In the multiple solutions, the Big O notation has to conduct a search operation. So, let us use the Linear search and the Binary search to understand the process of Big O notation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Linear Search<\/h2>\n\n\n\n<p>In this method, an element is searched from a whole list of data until a match is found. The assumption is that the data is sorted in sequence. So, the number of steps to be followed will depend on the length of the array. It means if there are 1 million data in a series, the algorithm will perform 1 million steps to search for the target element. As the size of input increases, the number of steps to search will correspondingly increase. So, the time complexity is quite high.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example &#8211;<\/h3>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td>      2      <\/td><td>     4     <\/td><td>     6     <\/td><td>     8     <\/td><td>     9     <\/td><td>     12     <\/td><td>     14     <\/td><td>     16     <\/td><td>     18     <\/td><td>     20     <\/td><\/tr><\/tbody><\/table><figcaption>Linear Search<\/figcaption><\/figure>\n\n\n\n<p>In the above table, there are 10 numbers. Let us consider that the target element to be searched is number 12. So, the algorithm matches each and every value in the box with number 12. As its search activity reaches Box No.6, it finds a match and displays the result. So, it had to perform six steps to get the answer. If the position of number 12 was in the last box, then the algorithm would have to perform 10 steps. In the worst case, if the target element is not in the list, then the algorithm gives the result as \u201cNot found\u201d. So, the instruction is always to conduct an entire search. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15175351\/Linear-search.jpeg\" alt=\"Big O notation in data structure\" class=\"wp-image-186406\" width=\"576\" height=\"209\" srcset=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15175351\/Linear-search.jpeg 372w, https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15175351\/Linear-search-300x109.jpeg 300w, https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15175351\/Linear-search-370x135.jpeg 370w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Binary Search<\/h2>\n\n\n\n<p>In this approach, the target element is not matched with individual data in the whole list. The algorithm divides the whole array into two parts. So, the Big O notation divides the total number of records by two to arrive at the mid value. Then it compares the mid value with the target element. If it does not match, it further checks whether this mid value is greater or less than the target element. So, if the mid value is greater, then all the values higher than the mid value are excluded in the next search. If the mid value is lower, then all the values lower than the mid value are excluded in the next search. Then it again divides the remaining records by two to arrive at its mid value and the search continues.<\/p>\n\n\n\n<p>So, at every stage of operation, it reduces the search records by 50% while calculating the mid value.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example &#8211;<\/h3>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td>      2      <\/td><td>     4     <\/td><td>     6     <\/td><td>     8     <\/td><td>     9     <\/td><td>     12     <\/td><td>     14     <\/td><td>     16     <\/td><td>     18     <\/td><td>     20     <\/td><\/tr><\/tbody><\/table><figcaption>Binary Search<\/figcaption><\/figure>\n\n\n\n<p>Let us consider the same set of 10 numbers with the target element again as 12. So, in this method, 10 is divided by 2 which gives us the answer 5. So, the fifth number in the table is 9 which becomes the mid value.&nbsp;Now, Big O notation compares 9 with the target element 12. Since, mid-value is less than 12, the number 9 and the numbers less than 9 will not be a part of the next search. So, it has removed half of the numbers for the next operation. Subsequently, only the numbers in the remaining 5 boxes will be considered for the next search. In the next operation, the mid value is 16 which is higher than the target element. So, it again removes the number 16 and all the numbers higher than 16 from the next search. <\/p>\n\n\n\n<p>So, we are left with only 12 and 14. Now the algorithm will find its match in the next operation. So, from the same set of numbers, the Binary approach follows only 4-5 steps to find the target element. Even if the total records are in millions, this approach will provide the answer with just a few more steps.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15175637\/Binary-search-1.png\" alt=\"Big O notation in data structure\" class=\"wp-image-186407\" width=\"599\" height=\"272\" srcset=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15175637\/Binary-search-1.png 333w, https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15175637\/Binary-search-1-300x136.png 300w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/><\/figure><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Big O notation and Time Complexity<\/h2>\n\n\n\n<p>Time Complexity is the measure of increase in the running time of an algorithm when there is an increase in the input data. In the Linear approach, the Big O notation is denoted as O(n).&nbsp; In the Binary approach, it is denoted as O(log n). The Big O adopts the worst-case scenario to indicate the longest time an algorithm takes to perform.<\/p>\n\n\n\n<p>So, the big O notation in data structure compares the number of operations performed by the Linear and the Binary method. From the above calculation for Linear search, it is clear that its running time will grow exponentially with 10 times increase in the input data. However, the running time for Binary search will increase only slightly, even if the input data increases by 10 times. With Big O notation, the developers can classify algorithms based on their runtime analysis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Types of complexities in algorithms<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td>    1   <\/td><td>    O(1)<\/td><td>   Constant time<\/td><\/tr><tr><td>    2<\/td><td>    O(log n)<\/td><td>   Logarithmic time (used in Binary search)<\/td><\/tr><tr><td>    3<\/td><td>    O(n)<\/td><td>   Linear time (used in Linear search)  <\/td><\/tr><tr><td>    4<\/td><td>    O(n log n)<\/td><td>   Linearithmic time<\/td><\/tr><tr><td>    5<\/td><td>    O(n^2)<\/td><td>   Quadratic time<\/td><\/tr><tr><td>    6<\/td><td>    O(2^n)<\/td><td>   Exponential time<\/td><\/tr><tr><td>    7<\/td><td>    O(n!)<\/td><td>   Factorial time<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>From the above list, the first two complexities can be considered as time-efficient.&nbsp; The companies can adopt the third complexity though its running time is more than the first two. But the remaining four complexities have a very long execution time. Considering the time constraints, it will not be practical to adopt them in the production environment. So, it would be advisable for companies to focus on the first three complexities.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/15180629\/Complexities-1.png\" alt=\"Big O notation in data structure\" class=\"wp-image-186409\" width=\"518\" height=\"326\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Henry Harvin Education<\/strong><\/h2>\n\n\n\n<p>For a deeper understanding on the Big O notation, two courses from Henry Harvin can be helpful to the readers. They are <a href=\"https:\/\/www.henryharvin.com\/artificial-intelligence-course\">Artificial Intelligence Course<\/a> and <a href=\"https:\/\/www.henryharvin.com\/machine-learning-course-using-python-cmlp\">Machine Learning Course Using Python | CMLP Certification<\/a><\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>The Big O notation in data structure provides the lower and upper boundaries of the algorithm\u2019s running time. It compares various algorithm solutions based on its execution time and the space occupied in the memory. From this result, the company can implement the most efficient algorithm to solve their problems. All in all, the Big O notation in data structure is a valuable tool to analyze the complexities of algorithms.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1700071789740\"><strong class=\"schema-faq-question\">Who controls the algorithm?<\/strong> <p class=\"schema-faq-answer\">Algorithm engineers set up algorithms for companies. Once programmed effectively, the algorithms do not need any further human help. It has the ability to function as per the instructions. In today\u2019s digital age, algorithms offer huge benefits in performing complex calculations.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1700071841421\"><strong class=\"schema-faq-question\">How accurate is Big O notation in data structure?<\/strong> <p class=\"schema-faq-answer\">The Big O notation in data structure cannot be considered as 100% accurate. It gives an approximate running time of the algorithm but not the exact time. Since it considers the worst-case scenario, its usage offers satisfying benefits.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1700071874260\"><strong class=\"schema-faq-question\">What does O(1) indicate in the Big O notation in data structure?<\/strong> <p class=\"schema-faq-answer\">O(1) indicates a constant time algorithm. It means the algorithm will take the same amount of time for its execution, irrespective of the input size.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1700071898989\"><strong class=\"schema-faq-question\">Should we use Big O notation for all the computations?<\/strong> <p class=\"schema-faq-answer\">Not required. Big O notation can be used when the input data for computation is vast in number. So, if the data is less, then the existing tools would be enough to obtain the result.<br \/><\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Big O Notation in data structure is mainly used in the field of mathematics and computer science. It informs us&#8230;<\/p>\n","protected":false},"author":1064,"featured_media":187032,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","two_page_speed":[],"footnotes":""},"categories":[18420],"tags":[],"class_list":["post-186403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introduction to Big O Notation in Data Structure<\/title>\n<meta name=\"description\" content=\"Companies use several algorithms to solve a problem. The Big O notation in data structure selects the most efficient algorithm from them.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to Big O Notation in Data Structure\" \/>\n<meta property=\"og:description\" content=\"Companies use several algorithms to solve a problem. The Big O notation in data structure selects the most efficient algorithm from them.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/\" \/>\n<meta property=\"og:site_name\" content=\"Henry Harvin Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-11T14:16:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-19T12:30:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/22121943\/Big-O-Notation-in-Data-Structure.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"1067\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vinod Nair\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@henryharvin_in\" \/>\n<meta name=\"twitter:site\" content=\"@henryharvin_in\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vinod Nair\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/\"},\"author\":{\"name\":\"Vinod Nair\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/2834daa7d7a2a92c08588a10e601c547\"},\"headline\":\"Introduction to Big O Notation in Data Structure\",\"datePublished\":\"2023-12-11T14:16:00+00:00\",\"dateModified\":\"2023-12-19T12:30:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/\"},\"wordCount\":1387,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/a86f96dfdfc6fa224445f6b651967094\"},\"image\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/22121943\\\/Big-O-Notation-in-Data-Structure.png\",\"articleSection\":[\"Learn More About Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#respond\"]}]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/\",\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/\",\"name\":\"Introduction to Big O Notation in Data Structure\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/22121943\\\/Big-O-Notation-in-Data-Structure.png\",\"datePublished\":\"2023-12-11T14:16:00+00:00\",\"dateModified\":\"2023-12-19T12:30:44+00:00\",\"description\":\"Companies use several algorithms to solve a problem. The Big O notation in data structure selects the most efficient algorithm from them.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071789740\"},{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071841421\"},{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071874260\"},{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071898989\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#primaryimage\",\"url\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/22121943\\\/Big-O-Notation-in-Data-Structure.png\",\"contentUrl\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/22121943\\\/Big-O-Notation-in-Data-Structure.png\",\"width\":1600,\"height\":1067,\"caption\":\"Big O Notation in Data Structure\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Artificial Intelligence\",\"item\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/category\\\/artificial-intelligence\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Learn More About Machine Learning\",\"item\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/category\\\/artificial-intelligence\\\/machine-learning\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Introduction to Big O Notation in Data Structure\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/\",\"name\":\"Henry Harvin Blog\",\"description\":\"Latest Online Courses &amp; Certification Blogs\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/a86f96dfdfc6fa224445f6b651967094\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/a86f96dfdfc6fa224445f6b651967094\",\"name\":\"George L V\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/19130846\\\/cropped-Henry-harvin-logo-1.png\",\"url\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/19130846\\\/cropped-Henry-harvin-logo-1.png\",\"contentUrl\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/19130846\\\/cropped-Henry-harvin-logo-1.png\",\"width\":445,\"height\":130,\"caption\":\"George L V\"},\"logo\":{\"@id\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/19130846\\\/cropped-Henry-harvin-logo-1.png\"},\"description\":\"George is an expert communicator. As a coordinator, senior language instructor, center head and a content writer the basic requirement at the DNA level was the same \u2013 effective communication. He discovered early in life that quality of communication makes the difference between great results and mediocre outcomes. And thus, he developed his first forte: focus on the listener and tailor the message accordingly. As he progressed in his career, he realized that the most compelling stories communicate through multi-sensory messaging - a powerful combination of visual, verbal, and intuitive content.\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/#\\\/schema\\\/person\\\/2834daa7d7a2a92c08588a10e601c547\",\"name\":\"Vinod Nair\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/20032618\\\/Passport-photo-Nov23-150x150.jpg\",\"url\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/20032618\\\/Passport-photo-Nov23-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/hh-certificates.sgp1.digitaloceanspaces.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/20032618\\\/Passport-photo-Nov23-150x150.jpg\",\"caption\":\"Vinod Nair\"},\"description\":\"I am an M.Com professional with a rich banking experience of 28 years. With my deep passion and fascination for writing, I decided to convert my passion into my profession. Hence, I switched over to the field of content writing. Currently, I am pursuing a Post Graduation in Content Writing from Henry Harvin Education. I have obtained certification for Content Writing, Creative Writing and Technical Writing courses.\u00a0 The courses on Medical Writing, Digital Marketing and Copywriting are in progress.\",\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/author\\\/vinodnair7943gmail-com\\\/\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071789740\",\"position\":1,\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071789740\",\"name\":\"Who controls the algorithm?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Algorithm engineers set up algorithms for companies. Once programmed effectively, the algorithms do not need any further human help. It has the ability to function as per the instructions. In today\u2019s digital age, algorithms offer huge benefits in performing complex calculations.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071841421\",\"position\":2,\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071841421\",\"name\":\"How accurate is Big O notation in data structure?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The Big O notation in data structure cannot be considered as 100% accurate. It gives an approximate running time of the algorithm but not the exact time. Since it considers the worst-case scenario, its usage offers satisfying benefits.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071874260\",\"position\":3,\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071874260\",\"name\":\"What does O(1) indicate in the Big O notation in data structure?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"O(1) indicates a constant time algorithm. It means the algorithm will take the same amount of time for its execution, irrespective of the input size.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071898989\",\"position\":4,\"url\":\"https:\\\/\\\/www.henryharvin.com\\\/blog\\\/big-o-notation-in-data-structure\\\/#faq-question-1700071898989\",\"name\":\"Should we use Big O notation for all the computations?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Not required. Big O notation can be used when the input data for computation is vast in number. So, if the data is less, then the existing tools would be enough to obtain the result.<br \\\/>\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introduction to Big O Notation in Data Structure","description":"Companies use several algorithms to solve a problem. The Big O notation in data structure selects the most efficient algorithm from them.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/","og_locale":"en_US","og_type":"article","og_title":"Introduction to Big O Notation in Data Structure","og_description":"Companies use several algorithms to solve a problem. The Big O notation in data structure selects the most efficient algorithm from them.","og_url":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/","og_site_name":"Henry Harvin Blog","article_published_time":"2023-12-11T14:16:00+00:00","article_modified_time":"2023-12-19T12:30:44+00:00","og_image":[{"width":1600,"height":1067,"url":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/22121943\/Big-O-Notation-in-Data-Structure.png","type":"image\/png"}],"author":"Vinod Nair","twitter_card":"summary_large_image","twitter_creator":"@henryharvin_in","twitter_site":"@henryharvin_in","twitter_misc":{"Written by":"Vinod Nair","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#article","isPartOf":{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/"},"author":{"name":"Vinod Nair","@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/2834daa7d7a2a92c08588a10e601c547"},"headline":"Introduction to Big O Notation in Data Structure","datePublished":"2023-12-11T14:16:00+00:00","dateModified":"2023-12-19T12:30:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/"},"wordCount":1387,"commentCount":0,"publisher":{"@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/a86f96dfdfc6fa224445f6b651967094"},"image":{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#primaryimage"},"thumbnailUrl":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/22121943\/Big-O-Notation-in-Data-Structure.png","articleSection":["Learn More About Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#respond"]}]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/","url":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/","name":"Introduction to Big O Notation in Data Structure","isPartOf":{"@id":"https:\/\/www.henryharvin.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#primaryimage"},"image":{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#primaryimage"},"thumbnailUrl":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/22121943\/Big-O-Notation-in-Data-Structure.png","datePublished":"2023-12-11T14:16:00+00:00","dateModified":"2023-12-19T12:30:44+00:00","description":"Companies use several algorithms to solve a problem. The Big O notation in data structure selects the most efficient algorithm from them.","breadcrumb":{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071789740"},{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071841421"},{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071874260"},{"@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071898989"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#primaryimage","url":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/22121943\/Big-O-Notation-in-Data-Structure.png","contentUrl":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/22121943\/Big-O-Notation-in-Data-Structure.png","width":1600,"height":1067,"caption":"Big O Notation in Data Structure"},{"@type":"BreadcrumbList","@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.henryharvin.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Artificial Intelligence","item":"https:\/\/www.henryharvin.com\/blog\/category\/artificial-intelligence\/"},{"@type":"ListItem","position":3,"name":"Learn More About Machine Learning","item":"https:\/\/www.henryharvin.com\/blog\/category\/artificial-intelligence\/machine-learning\/"},{"@type":"ListItem","position":4,"name":"Introduction to Big O Notation in Data Structure"}]},{"@type":"WebSite","@id":"https:\/\/www.henryharvin.com\/blog\/#website","url":"https:\/\/www.henryharvin.com\/blog\/","name":"Henry Harvin Blog","description":"Latest Online Courses &amp; Certification Blogs","publisher":{"@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/a86f96dfdfc6fa224445f6b651967094"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.henryharvin.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/a86f96dfdfc6fa224445f6b651967094","name":"George L V","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2025\/01\/19130846\/cropped-Henry-harvin-logo-1.png","url":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2025\/01\/19130846\/cropped-Henry-harvin-logo-1.png","contentUrl":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2025\/01\/19130846\/cropped-Henry-harvin-logo-1.png","width":445,"height":130,"caption":"George L V"},"logo":{"@id":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2025\/01\/19130846\/cropped-Henry-harvin-logo-1.png"},"description":"George is an expert communicator. As a coordinator, senior language instructor, center head and a content writer the basic requirement at the DNA level was the same \u2013 effective communication. He discovered early in life that quality of communication makes the difference between great results and mediocre outcomes. And thus, he developed his first forte: focus on the listener and tailor the message accordingly. As he progressed in his career, he realized that the most compelling stories communicate through multi-sensory messaging - a powerful combination of visual, verbal, and intuitive content."},{"@type":"Person","@id":"https:\/\/www.henryharvin.com\/blog\/#\/schema\/person\/2834daa7d7a2a92c08588a10e601c547","name":"Vinod Nair","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/20032618\/Passport-photo-Nov23-150x150.jpg","url":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/20032618\/Passport-photo-Nov23-150x150.jpg","contentUrl":"https:\/\/hh-certificates.sgp1.digitaloceanspaces.com\/blog\/wp-content\/uploads\/2023\/11\/20032618\/Passport-photo-Nov23-150x150.jpg","caption":"Vinod Nair"},"description":"I am an M.Com professional with a rich banking experience of 28 years. With my deep passion and fascination for writing, I decided to convert my passion into my profession. Hence, I switched over to the field of content writing. Currently, I am pursuing a Post Graduation in Content Writing from Henry Harvin Education. I have obtained certification for Content Writing, Creative Writing and Technical Writing courses.\u00a0 The courses on Medical Writing, Digital Marketing and Copywriting are in progress.","url":"https:\/\/www.henryharvin.com\/blog\/author\/vinodnair7943gmail-com\/"},{"@type":"Question","@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071789740","position":1,"url":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071789740","name":"Who controls the algorithm?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Algorithm engineers set up algorithms for companies. Once programmed effectively, the algorithms do not need any further human help. It has the ability to function as per the instructions. In today\u2019s digital age, algorithms offer huge benefits in performing complex calculations.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071841421","position":2,"url":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071841421","name":"How accurate is Big O notation in data structure?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"The Big O notation in data structure cannot be considered as 100% accurate. It gives an approximate running time of the algorithm but not the exact time. Since it considers the worst-case scenario, its usage offers satisfying benefits.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071874260","position":3,"url":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071874260","name":"What does O(1) indicate in the Big O notation in data structure?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"O(1) indicates a constant time algorithm. It means the algorithm will take the same amount of time for its execution, irrespective of the input size.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071898989","position":4,"url":"https:\/\/www.henryharvin.com\/blog\/big-o-notation-in-data-structure\/#faq-question-1700071898989","name":"Should we use Big O notation for all the computations?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Not required. Big O notation can be used when the input data for computation is vast in number. So, if the data is less, then the existing tools would be enough to obtain the result.<br \/>","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"views":692,"_links":{"self":[{"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/posts\/186403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/users\/1064"}],"replies":[{"embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/comments?post=186403"}],"version-history":[{"count":0,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/posts\/186403\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/media\/187032"}],"wp:attachment":[{"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/media?parent=186403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/categories?post=186403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.henryharvin.com\/blog\/wp-json\/wp\/v2\/tags?post=186403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}