{"id":3178,"date":"2021-06-09T22:38:00","date_gmt":"2021-06-09T17:08:00","guid":{"rendered":"https:\/\/manorinfinity.com\/blog\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/"},"modified":"2021-06-09T22:38:00","modified_gmt":"2021-06-09T17:08:00","slug":"guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs","status":"publish","type":"post","link":"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/","title":{"rendered":"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS"},"content":{"rendered":"<p><span style=\"white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Do you Know? In how many ways, you can express your algorithm? <\/span><\/span><\/p>\n<p><span style=\"white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">There are two ways to express your algorithms-<\/span><\/span><\/p>\n<p><span><\/p>\n<h4 dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 2pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">1. Iterative Algorithms<\/span><\/span><\/h4>\n<h4 dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 2pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">2. Recursive Algorithms<\/span><\/span><\/h4>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Recursive algorithms can be converted into iterative algorithms and iterative algorithms can be converted into recursive algorithms, both have same in power.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">We will see the examples of both types of algorithm in further post.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-size: large;\"><\/span><\/span><\/p>\n<p><a name='more'><\/a><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\"><br \/><\/span><\/span><\/p>\n<h1 dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 6pt; margin-top: 24pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Guidelines for Asymptotic Notations:<\/span><\/span><\/h1>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">So, there are some rules that you have to follow. These rules help us to determine the time complexity (running time) of the algorithm.<\/span><\/span><\/p>\n<h2 dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 4pt; margin-top: 18pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">1. <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;\">Non-Recursive and Non-Loop Statements:<\/span><\/span><\/h2>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">If any algorithm doesn&#8217;t contain loop, recursion and call to any other non-constant time algorithm,<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"> <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">then the time complexity of this type of algorithm is considered as <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(1)<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"> or<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"> linear time complexity<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">Example 1-<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"> <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">swap()<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"> algorithm has <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(1)<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"> time complexity.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">Example 2- <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">If a loop or recursion that runs a <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">constant<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"> number of times. Then, this loop or recursion is also considered as <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(1)<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"> time complexity. Here is the example- (c-constant)&nbsp;<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Hence, Time Complexity = <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(1)<\/span><\/span><\/p>\n<h2 dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 4pt; margin-top: 18pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">2. <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;\">Loop Statements:<\/span><\/span><\/h2>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">The running time of a loop, can be expressed as the running time of the statements inside the loop (including tests) multiplies by the number of iterations.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example 1-<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Hence, Time Complexity = c*n = <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(n)&nbsp;<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">or<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">There is one more definition for this section, i.e., Time complexity of a loop can be considered as <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(n),<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"> if the variable used in loop is incremented\/decremented by a constant value.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example 2-<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Here, c &#8211; positive integer constant<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Hence, Time Complexity = <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(n)<\/span><\/span><\/p>\n<h2 dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 4pt; margin-top: 18pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">3. <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;\">Nested Loop Statements:<\/span><\/span><\/h2>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">If we have to analyze the time complexity of the nested loop statements, then always analyze from the inside out. Total time complexity is the product of the sizes of all the loops.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example-<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Hence, Time Complexity = c*n*n = c*n<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: super;\">2<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"> = <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(n<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: super;\">2<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">)<\/span><\/span><\/p>\n<h2 dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 4pt; margin-top: 18pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">4. <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;\">Consecutive Loop Statements:<\/span><\/span><\/h2>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">In the case of consecutive loop statements, add the time complexities of individual loops.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example-<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Hence, Time Complexity = O(m) + O(n) =<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"> O(m+n)&nbsp;<\/span><\/span><\/p>\n<h2 dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 4pt; margin-top: 18pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">5. <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;\">Logarithmic Complexity:<\/span><\/span><\/h2>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Time complexity of a loop is considered as <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(logn)<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">, if the loop variable is multiplied\/divided by a constant value.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example 1-<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Hence, Time Complexity = <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(log<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: sub;\">c<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">n)&nbsp;<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">or we can say that, in the above example, the loop runs<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"> (log<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: sub;\">c<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">n) <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">times.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Why here is &#8216;c&#8217; in the log base?&nbsp;<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Let c=2 in the above example,<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">i : 1, 2, 4, 8,&#8230;&#8230;, n<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">i : <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">2<\/span><span style=\"font-style: italic; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: super;\">0<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">, 2<\/span><span style=\"font-style: italic; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: super;\">1<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">, 2<\/span><span style=\"font-style: italic; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: super;\">2<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">, 2<\/span><span style=\"font-style: italic; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: super;\">3<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">,&#8230;., <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">2<\/span><span style=\"font-style: italic; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: super;\">k<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">&nbsp;&nbsp;&nbsp;<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Hence, n = 2<\/span><span style=\"font-style: italic; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: super;\">k<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">&nbsp;<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Taking logarithm in both sides,<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">log<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: sub;\">2<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">n = k*log<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: sub;\">2<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">2<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">k = log<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: sub;\">2<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">n&nbsp;<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Hence, T(n) = <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(log<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: sub;\">2<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">n)<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">and<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Time complexity of a loop is considered as <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(loglogn)<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">,<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"> <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">if the loop variable is reduced\/increased exponentially by a constant value.<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example 2-<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\">Hence, Time Complexity = <\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">O(log<\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"vertical-align: sub;\">c<\/span><\/span><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;\">logn)<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Why here is &#8216;c&#8217; in the log base? Try to prove it. Take c=3,4&#8230;.or some other constant value.<\/span><\/span><\/p>\n<div style=\"line-height: 1.38; margin-bottom: 4pt; margin-top: 18pt; text-align: left;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"font-weight: 400;\">If you find any problem related to this article, please comment below or contact me&nbsp;<\/span><span style=\"color: black; font-weight: normal;\"><a href=\"https:\/\/www.bitsofcs.xyz\/p\/contact-me.html\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a><\/span><span style=\"font-weight: 400;\">.<\/span><\/span><\/div>\n<p><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you Know? In how many ways, you can express your algorithm? There are two ways to express your algorithms- 1. Iterative Algorithms 2. Recursive Algorithms Recursive algorithms can be converted into iterative algorithms and iterative algorithms can be converted into recursive algorithms, both have same in power. We will&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/\">Read the post<span class=\"screen-reader-text\">Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3178","post","type-post","status-publish","format-standard","hentry","category-infinity-fitness","excerpt","zoom","full-without-featured","even","excerpt-0"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.12 (Yoast SEO v26.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS | ManOrInfinity<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS\" \/>\n<meta property=\"og:description\" content=\"Do you Know? In how many ways, you can express your algorithm? There are two ways to express your algorithms- 1. Iterative Algorithms 2. Recursive Algorithms Recursive algorithms can be converted into iterative algorithms and iterative algorithms can be converted into recursive algorithms, both have same in power. We will&#8230;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/\" \/>\n<meta property=\"og:site_name\" content=\"ManOrInfinity\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-09T17:08:00+00:00\" \/>\n<meta name=\"author\" content=\"manorinfinity\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@manorinfinity\" \/>\n<meta name=\"twitter:site\" content=\"@manorinfinity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"manorinfinity\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/\"},\"author\":{\"name\":\"manorinfinity\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901\"},\"headline\":\"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS\",\"datePublished\":\"2021-06-09T17:08:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/\"},\"wordCount\":502,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901\"},\"articleSection\":[\"Infinity Fitness\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/\",\"url\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/\",\"name\":\"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS | ManOrInfinity\",\"isPartOf\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/#website\"},\"datePublished\":\"2021-06-09T17:08:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/manorinfinity.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/#website\",\"url\":\"https:\/\/manorinfinity.com\/blog\/\",\"name\":\"ManOrInfinity\",\"description\":\"Thrive towards greatness\",\"publisher\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/manorinfinity.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901\",\"name\":\"manorinfinity\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/manorinfinity.com\/wp-content\/uploads\/2023\/06\/moi-logo.png\",\"contentUrl\":\"http:\/\/manorinfinity.com\/wp-content\/uploads\/2023\/06\/moi-logo.png\",\"width\":282,\"height\":260,\"caption\":\"manorinfinity\"},\"logo\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Complex Problem Solver, Outloud Thinker, An Outstanding Writer, and a very curious human being\",\"sameAs\":[\"http:\/\/manorinfinity.com\"],\"url\":\"https:\/\/manorinfinity.com\/blog\/author\/manorinfinity\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS | ManOrInfinity","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:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/","og_locale":"en_US","og_type":"article","og_title":"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS","og_description":"Do you Know? In how many ways, you can express your algorithm? There are two ways to express your algorithms- 1. Iterative Algorithms 2. Recursive Algorithms Recursive algorithms can be converted into iterative algorithms and iterative algorithms can be converted into recursive algorithms, both have same in power. We will&#8230;","og_url":"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/","og_site_name":"ManOrInfinity","article_published_time":"2021-06-09T17:08:00+00:00","author":"manorinfinity","twitter_card":"summary_large_image","twitter_creator":"@manorinfinity","twitter_site":"@manorinfinity","twitter_misc":{"Written by":"manorinfinity","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/#article","isPartOf":{"@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/"},"author":{"name":"manorinfinity","@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901"},"headline":"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS","datePublished":"2021-06-09T17:08:00+00:00","mainEntityOfPage":{"@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/"},"wordCount":502,"commentCount":0,"publisher":{"@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901"},"articleSection":["Infinity Fitness"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/","url":"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/","name":"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS | ManOrInfinity","isPartOf":{"@id":"https:\/\/manorinfinity.com\/blog\/#website"},"datePublished":"2021-06-09T17:08:00+00:00","breadcrumb":{"@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/09\/guidelines-for-asymptotic-notations-how-to-calculate-time-complexity-bitsofcs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/manorinfinity.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Guidelines For Asymptotic Notations | How to Calculate Time Complexity | BitsOfCS"}]},{"@type":"WebSite","@id":"https:\/\/manorinfinity.com\/blog\/#website","url":"https:\/\/manorinfinity.com\/blog\/","name":"ManOrInfinity","description":"Thrive towards greatness","publisher":{"@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/manorinfinity.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901","name":"manorinfinity","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/image\/","url":"http:\/\/manorinfinity.com\/wp-content\/uploads\/2023\/06\/moi-logo.png","contentUrl":"http:\/\/manorinfinity.com\/wp-content\/uploads\/2023\/06\/moi-logo.png","width":282,"height":260,"caption":"manorinfinity"},"logo":{"@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/image\/"},"description":"Complex Problem Solver, Outloud Thinker, An Outstanding Writer, and a very curious human being","sameAs":["http:\/\/manorinfinity.com"],"url":"https:\/\/manorinfinity.com\/blog\/author\/manorinfinity\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/posts\/3178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/comments?post=3178"}],"version-history":[{"count":0,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/posts\/3178\/revisions"}],"wp:attachment":[{"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/media?parent=3178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/categories?post=3178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/tags?post=3178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}