{"id":4116,"date":"2024-04-27T04:38:12","date_gmt":"2024-04-26T23:08:12","guid":{"rendered":"https:\/\/cthecosmos.com\/?p=4116"},"modified":"2024-04-27T04:38:12","modified_gmt":"2024-04-26T23:08:12","slug":"%f0%9d%91%bb%f0%9d%92%89%f0%9d%92%86-%f0%9d%91%ba%f0%9d%92%86%f0%9d%92%93%f0%9d%92%8a%f0%9d%92%86%f0%9d%92%94-%f0%9d%92%90%f0%9d%92%87-%f0%9d%91%a9%f0%9d%92%8a%f0%9d%92%88-%f0%9d%91%b6","status":"publish","type":"post","link":"https:\/\/cthecosmos.com\/?p=4116","title":{"rendered":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 &#8211; \ud835\udc70"},"content":{"rendered":"\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-1 wp-block-paragraph\" style=\"font-size:17px;line-height:1.8\">The &#8220;O&#8221; in Big O stands for &#8220;<strong>Order of<\/strong>,&#8221;. Big O Notation describes how the performance of an algorithm varies with the size of the input effectively giving a worst-case or upper-limit scenario. It&#8217;s like the speed limit sign on a road; you know you won&#8217;t be going faster than that limit.<br><br><strong>O(1) \u2013 Constant Time<\/strong><br><br><strong><em>O(1) <\/em><\/strong>means that no matter how big your input is, the algorithm takes a constant amount of time to complete. The time it takes doesn&#8217;t depend on the size of the data set, it&#8217;s as fast as you can get.<br><br>Consider the scenario of checking your watch. Regardless of how busy you are, it takes the same quick glance to check the time on your watch. Another example would be pressing an elevator button. No matter which floor you are going to, pressing the button takes the same amount of time.<br><br>Accessing an array element by its index is an O(1) operation.<br><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\n\nint getElement(int arr&#x5B;], int index) {\nreturn arr&#x5B;index];\n}\n<\/pre><\/div>\n\n\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-2 wp-block-paragraph\" style=\"font-size:17px;line-height:1.8\">Swapping two numbers in memory takes constant time, regardless of the values of the numbers.<br><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\nvoid swap(int *a, int *b) {\nint temp = *a;\n*a = *b;\n*b = temp;\n}\n<\/pre><\/div>\n\n\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-3 wp-block-paragraph\" style=\"font-size:17px;line-height:1.8\">If you have a pointer to the head of a linked list, inserting a new node at the beginning is an O(1) operation.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\ntypedef struct Node {\nint data;\nstruct Node *next;\n} Node;\n\nvoid insertAtHead(Node **head, int value) {\nNode *newNode = malloc(sizeof(Node));\nnewNode-&gt;data = value;\nnewNode-&gt;next = *head;\n*head = newNode;\n}\n\nIn this example, the loop will always run 10 times, no matter what. The time it takes is constant, hence O(1).\n\nvoid fixedLoop() {\nfor (int i = 0; i &lt; 10; i++) {\nprintf(&quot;This is iteration %d\\n&quot;, i);\n}\n}\n<\/pre><\/div>\n\n\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-4 wp-block-paragraph\" style=\"font-size:17px;line-height:1.8\">Here, the outer loop runs 5 times, and the inner loop runs 4 times. The total number of iterations is 5\u00d74=20, which is a constant. So, the time complexity is still O(1).<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\n\nvoid nestedFixedLoops() {\nfor (int i = 0; i &lt; 5; i++) {\nfor (int j = 0; j &lt; 4; j++) {\nprintf(&quot;This is iteration (%d, %d)\\n&quot;, i, j);\n}\n}\n}\n\n<\/pre><\/div>\n\n\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-5 wp-block-paragraph\" style=\"font-size:17px;line-height:1.8\">Even though this loop could run up to n times depending on the input array, if it contains a zero, the loop will exit early. However, this doesn&#8217;t make it O(1); it&#8217;s actually O(n) in the worst case when there&#8217;s no zero.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\nvoid loopWithEarlyExit(int arr&#x5B;], int n) {\nfor (int i = 0; i &lt; n; i++) {\nprintf(&quot;This is iteration %d\\n&quot;, i);\n\nif (arr&#x5B;i] == 0) {\nbreak;\n}\n}\n}\n<\/pre><\/div>\n\n\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-6 wp-block-paragraph\" style=\"font-size:17px;line-height:1.8\">LinkedIn Post: <a href=\"https:\/\/www.linkedin.com\/posts\/t-yashwanth-naidu_learnwithyash-earlycareer-embeddedsystems-activity-7105057523723890688-yAlS\/?utm_source=share&amp;utm_medium=member_desktop\">https:\/\/www.linkedin.com\/posts\/t-yashwanth-naidu_learnwithyash-earlycareer-embeddedsystems-activity-7105057523723890688-yAlS\/?utm_source=share&amp;utm_medium=member_desktop<\/a><br><br><\/p>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color has-medium-font-size wp-elements-7 wp-block-paragraph\" style=\"background:linear-gradient(135deg,rgb(35,23,11) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)\">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><strong>An Article by: <\/strong>Yashwanth Naidu Tikkisetty<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Big O Notation provides a way to describe how the performance of an algorithm changes with input size, offering a worst-case scenario. O(1) represents constant time, where the algorithm takes the same amount of time regardless of input size. Examples include accessing array elements by index, swapping numbers, and inserting nodes in a linked list.<\/p>\n<a href=\"https:\/\/cthecosmos.com\/?p=4116\" class=\"more-link\">Read More <span class=\"screen-reader-text\">~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 &#8211; \ud835\udc70<\/span><\/a>","protected":false},"author":120055267,"featured_media":4117,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":false,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[36985,28627,30181,952411],"tags":[529459,772321195,37687,772321193,196,1354040,7676441,7676440],"class_list":["post-4116","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","category-embedded","category-embedded-systems","category-short-articles","tag-bigo","tag-c-programming","tag-data-structures","tag-embedded-systems","tag-programming","tag-short-article","tag-space-complexity","tag-time-complexity","fallback-thumbnail"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Big O Notation provides a way to describe how the performance of an algorithm changes with input size, offering a worst-case scenario. O(1) represents constant time, where the algorithm takes the same amount of time regardless of input size. Examples include accessing array elements by index, swapping numbers, and inserting nodes in a linked list.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yashwanth Naidu Tikkisetty\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/cthecosmos.com\/?p=4116\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Yashwanth Naidu Tikkisetty - Embedded Systems | Space Blogger\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 \u2013 \ud835\udc70 - Yashwanth Naidu Tikkisetty\" \/>\n\t\t<meta property=\"og:description\" content=\"Big O Notation provides a way to describe how the performance of an algorithm changes with input size, offering a worst-case scenario. O(1) represents constant time, where the algorithm takes the same amount of time regardless of input size. Examples include accessing array elements by index, swapping numbers, and inserting nodes in a linked list.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/cthecosmos.com\/?p=4116\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/cthecosmos.com\/wp-content\/uploads\/2018\/08\/logo1.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/cthecosmos.com\/wp-content\/uploads\/2018\/08\/logo1.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t\t<meta property=\"og:image:height\" content=\"1200\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-04-26T23:08:12+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-04-26T23:08:12+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 \u2013 \ud835\udc70 - Yashwanth Naidu Tikkisetty\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Big O Notation provides a way to describe how the performance of an algorithm changes with input size, offering a worst-case scenario. O(1) represents constant time, where the algorithm takes the same amount of time regardless of input size. Examples include accessing array elements by index, swapping numbers, and inserting nodes in a linked list.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/cthecosmos.com\/wp-content\/uploads\/2018\/08\/logo1.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#blogposting\",\"name\":\"~~~ \\ud835\\udc7b\\ud835\\udc89\\ud835\\udc86 \\ud835\\udc7a\\ud835\\udc86\\ud835\\udc93\\ud835\\udc8a\\ud835\\udc86\\ud835\\udc94 \\ud835\\udc90\\ud835\\udc87 \\ud835\\udc69\\ud835\\udc8a\\ud835\\udc88 \\ud835\\udc76 ~~~\\ud835\\udc77\\ud835\\udc82\\ud835\\udc93\\ud835\\udc95 \\u2013 \\ud835\\udc70 - Yashwanth Naidu Tikkisetty\",\"headline\":\"~~~ \\ud835\\udc7b\\ud835\\udc89\\ud835\\udc86 \\ud835\\udc7a\\ud835\\udc86\\ud835\\udc93\\ud835\\udc8a\\ud835\\udc86\\ud835\\udc94 \\ud835\\udc90\\ud835\\udc87 \\ud835\\udc69\\ud835\\udc8a\\ud835\\udc88 \\ud835\\udc76 ~~~\\ud835\\udc77\\ud835\\udc82\\ud835\\udc93\\ud835\\udc95 &#8211; \\ud835\\udc70\",\"author\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?author=120055267#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/cthecosmos.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/ponbigo-p1.png?fit=3909%2C3909&ssl=1\",\"width\":3909,\"height\":3909},\"datePublished\":\"2024-04-27T04:38:12+05:30\",\"dateModified\":\"2024-04-27T04:38:12+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#webpage\"},\"articleSection\":\"c programming, Embedded, Embedded Systems, SHORT ARTICLES, BigO, c programming, Data Structures, Embedded Systems, Programming, SHORT ARTICLE, Space Complexity, Time Complexity\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/cthecosmos.com\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?cat=28627#listItem\",\"name\":\"Embedded\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?cat=28627#listItem\",\"position\":2,\"name\":\"Embedded\",\"item\":\"https:\\\/\\\/cthecosmos.com\\\/?cat=28627\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#listItem\",\"name\":\"~~~ \\ud835\\udc7b\\ud835\\udc89\\ud835\\udc86 \\ud835\\udc7a\\ud835\\udc86\\ud835\\udc93\\ud835\\udc8a\\ud835\\udc86\\ud835\\udc94 \\ud835\\udc90\\ud835\\udc87 \\ud835\\udc69\\ud835\\udc8a\\ud835\\udc88 \\ud835\\udc76 ~~~\\ud835\\udc77\\ud835\\udc82\\ud835\\udc93\\ud835\\udc95 &#8211; \\ud835\\udc70\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#listItem\",\"position\":3,\"name\":\"~~~ \\ud835\\udc7b\\ud835\\udc89\\ud835\\udc86 \\ud835\\udc7a\\ud835\\udc86\\ud835\\udc93\\ud835\\udc8a\\ud835\\udc86\\ud835\\udc94 \\ud835\\udc90\\ud835\\udc87 \\ud835\\udc69\\ud835\\udc8a\\ud835\\udc88 \\ud835\\udc76 ~~~\\ud835\\udc77\\ud835\\udc82\\ud835\\udc93\\ud835\\udc95 &#8211; \\ud835\\udc70\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?cat=28627#listItem\",\"name\":\"Embedded\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/#person\",\"name\":\"Yashwanth Naidu Tikkisetty\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a02d9f38e4c924587b544c74f6d5de0c8469b6a5c684622f1aa4ea2ba65b17d8?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Yashwanth Naidu Tikkisetty\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?author=120055267#author\",\"url\":\"https:\\\/\\\/cthecosmos.com\\\/?author=120055267\",\"name\":\"Yashwanth Naidu Tikkisetty\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a02d9f38e4c924587b544c74f6d5de0c8469b6a5c684622f1aa4ea2ba65b17d8?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Yashwanth Naidu Tikkisetty\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#webpage\",\"url\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116\",\"name\":\"~~~ \\ud835\\udc7b\\ud835\\udc89\\ud835\\udc86 \\ud835\\udc7a\\ud835\\udc86\\ud835\\udc93\\ud835\\udc8a\\ud835\\udc86\\ud835\\udc94 \\ud835\\udc90\\ud835\\udc87 \\ud835\\udc69\\ud835\\udc8a\\ud835\\udc88 \\ud835\\udc76 ~~~\\ud835\\udc77\\ud835\\udc82\\ud835\\udc93\\ud835\\udc95 \\u2013 \\ud835\\udc70 - Yashwanth Naidu Tikkisetty\",\"description\":\"Big O Notation provides a way to describe how the performance of an algorithm changes with input size, offering a worst-case scenario. O(1) represents constant time, where the algorithm takes the same amount of time regardless of input size. Examples include accessing array elements by index, swapping numbers, and inserting nodes in a linked list.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?author=120055267#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?author=120055267#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/cthecosmos.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/ponbigo-p1.png?fit=3909%2C3909&ssl=1\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116\\\/#mainImage\",\"width\":3909,\"height\":3909},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/?p=4116#mainImage\"},\"datePublished\":\"2024-04-27T04:38:12+05:30\",\"dateModified\":\"2024-04-27T04:38:12+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/#website\",\"url\":\"https:\\\/\\\/cthecosmos.com\\\/\",\"name\":\"Yashwanth Naidu Tikkisetty\",\"description\":\"Embedded Systems | Space Blogger\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/cthecosmos.com\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 \u2013 \ud835\udc70 - Yashwanth Naidu Tikkisetty","description":"Big O Notation provides a way to describe how the performance of an algorithm changes with input size, offering a worst-case scenario. O(1) represents constant time, where the algorithm takes the same amount of time regardless of input size. Examples include accessing array elements by index, swapping numbers, and inserting nodes in a linked list.","canonical_url":"https:\/\/cthecosmos.com\/?p=4116","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/cthecosmos.com\/?p=4116#blogposting","name":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 \u2013 \ud835\udc70 - Yashwanth Naidu Tikkisetty","headline":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 &#8211; \ud835\udc70","author":{"@id":"https:\/\/cthecosmos.com\/?author=120055267#author"},"publisher":{"@id":"https:\/\/cthecosmos.com\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponbigo-p1.png?fit=3909%2C3909&ssl=1","width":3909,"height":3909},"datePublished":"2024-04-27T04:38:12+05:30","dateModified":"2024-04-27T04:38:12+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/cthecosmos.com\/?p=4116#webpage"},"isPartOf":{"@id":"https:\/\/cthecosmos.com\/?p=4116#webpage"},"articleSection":"c programming, Embedded, Embedded Systems, SHORT ARTICLES, BigO, c programming, Data Structures, Embedded Systems, Programming, SHORT ARTICLE, Space Complexity, Time Complexity"},{"@type":"BreadcrumbList","@id":"https:\/\/cthecosmos.com\/?p=4116#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/cthecosmos.com\/#listItem","position":1,"name":"Home","item":"https:\/\/cthecosmos.com\/","nextItem":{"@type":"ListItem","@id":"https:\/\/cthecosmos.com\/?cat=28627#listItem","name":"Embedded"}},{"@type":"ListItem","@id":"https:\/\/cthecosmos.com\/?cat=28627#listItem","position":2,"name":"Embedded","item":"https:\/\/cthecosmos.com\/?cat=28627","nextItem":{"@type":"ListItem","@id":"https:\/\/cthecosmos.com\/?p=4116#listItem","name":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 &#8211; \ud835\udc70"},"previousItem":{"@type":"ListItem","@id":"https:\/\/cthecosmos.com\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/cthecosmos.com\/?p=4116#listItem","position":3,"name":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 &#8211; \ud835\udc70","previousItem":{"@type":"ListItem","@id":"https:\/\/cthecosmos.com\/?cat=28627#listItem","name":"Embedded"}}]},{"@type":"Person","@id":"https:\/\/cthecosmos.com\/#person","name":"Yashwanth Naidu Tikkisetty","image":{"@type":"ImageObject","@id":"https:\/\/cthecosmos.com\/?p=4116#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/a02d9f38e4c924587b544c74f6d5de0c8469b6a5c684622f1aa4ea2ba65b17d8?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Yashwanth Naidu Tikkisetty"}},{"@type":"Person","@id":"https:\/\/cthecosmos.com\/?author=120055267#author","url":"https:\/\/cthecosmos.com\/?author=120055267","name":"Yashwanth Naidu Tikkisetty","image":{"@type":"ImageObject","@id":"https:\/\/cthecosmos.com\/?p=4116#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a02d9f38e4c924587b544c74f6d5de0c8469b6a5c684622f1aa4ea2ba65b17d8?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Yashwanth Naidu Tikkisetty"}},{"@type":"WebPage","@id":"https:\/\/cthecosmos.com\/?p=4116#webpage","url":"https:\/\/cthecosmos.com\/?p=4116","name":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 \u2013 \ud835\udc70 - Yashwanth Naidu Tikkisetty","description":"Big O Notation provides a way to describe how the performance of an algorithm changes with input size, offering a worst-case scenario. O(1) represents constant time, where the algorithm takes the same amount of time regardless of input size. Examples include accessing array elements by index, swapping numbers, and inserting nodes in a linked list.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/cthecosmos.com\/#website"},"breadcrumb":{"@id":"https:\/\/cthecosmos.com\/?p=4116#breadcrumblist"},"author":{"@id":"https:\/\/cthecosmos.com\/?author=120055267#author"},"creator":{"@id":"https:\/\/cthecosmos.com\/?author=120055267#author"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponbigo-p1.png?fit=3909%2C3909&ssl=1","@id":"https:\/\/cthecosmos.com\/?p=4116\/#mainImage","width":3909,"height":3909},"primaryImageOfPage":{"@id":"https:\/\/cthecosmos.com\/?p=4116#mainImage"},"datePublished":"2024-04-27T04:38:12+05:30","dateModified":"2024-04-27T04:38:12+05:30"},{"@type":"WebSite","@id":"https:\/\/cthecosmos.com\/#website","url":"https:\/\/cthecosmos.com\/","name":"Yashwanth Naidu Tikkisetty","description":"Embedded Systems | Space Blogger","inLanguage":"en-US","publisher":{"@id":"https:\/\/cthecosmos.com\/#person"}}]},"og:locale":"en_US","og:site_name":"Yashwanth Naidu Tikkisetty - Embedded Systems | Space Blogger","og:type":"article","og:title":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 \u2013 \ud835\udc70 - Yashwanth Naidu Tikkisetty","og:description":"Big O Notation provides a way to describe how the performance of an algorithm changes with input size, offering a worst-case scenario. O(1) represents constant time, where the algorithm takes the same amount of time regardless of input size. Examples include accessing array elements by index, swapping numbers, and inserting nodes in a linked list.","og:url":"https:\/\/cthecosmos.com\/?p=4116","og:image":"https:\/\/cthecosmos.com\/wp-content\/uploads\/2018\/08\/logo1.png","og:image:secure_url":"https:\/\/cthecosmos.com\/wp-content\/uploads\/2018\/08\/logo1.png","og:image:width":1200,"og:image:height":1200,"article:published_time":"2024-04-26T23:08:12+00:00","article:modified_time":"2024-04-26T23:08:12+00:00","twitter:card":"summary_large_image","twitter:title":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 \u2013 \ud835\udc70 - Yashwanth Naidu Tikkisetty","twitter:description":"Big O Notation provides a way to describe how the performance of an algorithm changes with input size, offering a worst-case scenario. O(1) represents constant time, where the algorithm takes the same amount of time regardless of input size. Examples include accessing array elements by index, swapping numbers, and inserting nodes in a linked list.","twitter:image":"https:\/\/cthecosmos.com\/wp-content\/uploads\/2018\/08\/logo1.png"},"aioseo_meta_data":{"post_id":"4116","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2025-08-31 20:20:33","updated":"2025-08-31 20:20:33","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cthecosmos.com\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/cthecosmos.com\/?cat=28627\" title=\"Embedded\">Embedded<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 \u2013 \ud835\udc70\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/cthecosmos.com\/"},{"label":"Embedded","link":"https:\/\/cthecosmos.com\/?cat=28627"},{"label":"~~~ \ud835\udc7b\ud835\udc89\ud835\udc86 \ud835\udc7a\ud835\udc86\ud835\udc93\ud835\udc8a\ud835\udc86\ud835\udc94 \ud835\udc90\ud835\udc87 \ud835\udc69\ud835\udc8a\ud835\udc88 \ud835\udc76 ~~~\ud835\udc77\ud835\udc82\ud835\udc93\ud835\udc95 &#8211; \ud835\udc70","link":"https:\/\/cthecosmos.com\/?p=4116"}],"jetpack_publicize_connections":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8CiEf-14o","jetpack-related-posts":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponbigo-p1.png?fit=3909%2C3909&ssl=1","_links":{"self":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts\/4116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/users\/120055267"}],"replies":[{"embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4116"}],"version-history":[{"count":7,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts\/4116\/revisions"}],"predecessor-version":[{"id":4124,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts\/4116\/revisions\/4124"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/media\/4117"}],"wp:attachment":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}