{"id":14,"date":"2023-10-26T08:50:36","date_gmt":"2023-10-26T08:50:36","guid":{"rendered":"https:\/\/favtutor.com\/articles\/?p=14"},"modified":"2024-08-23T10:42:16","modified_gmt":"2024-08-23T10:42:16","slug":"balanced-parentheses-java","status":"publish","type":"post","link":"https:\/\/favtutor.com\/articles\/balanced-parentheses-java\/","title":{"rendered":"Balanced Parentheses in Java (with code)"},"content":{"rendered":"\n<p>Parentheses, brackets, and braces are used extensively to group and organize expressions, conditions, and code blocks. When these parentheses are not balanced correctly, it can lead to syntax errors, logical inconsistencies, and even program crashes. In this article, we will discuss everything about Balanced Parentheses in Java.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What are Balanced Parentheses?&nbsp;<\/strong><\/h2>\n\n\n\n<p>Balanced parentheses refer to a state where every opening parenthesis has a corresponding closing parenthesis, and they are properly nested within each other. In other words, the number of opening and closing parentheses should match, and the order of their appearance should follow a well-defined structure. <\/p>\n\n\n\n<p>Consider the following examples :<\/p>\n\n\n\n<p>{[]}) &#8211; Unbalanced parentheses<\/p>\n\n\n\n<p>{()} [] &#8211;&nbsp; Balanced Parentheses<\/p>\n\n\n\n<p>Here is the problem statement we will solve here: <strong>We are given a string s that contains the characters &#8216;(&#8216;, &#8216;)&#8217;, &#8216;{&#8216;, &#8216;}&#8217;, &#8216;[&#8216; and &#8216;]&#8217;. We need to determine if the input string has balanced parentheses or not<\/strong>.<\/p>\n\n\n\n<p>An input string is balanced if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open brackets must be closed by the same type of brackets.<\/li>\n\n\n\n<li>Open brackets must be closed in the correct order.<\/li>\n\n\n\n<li>Every close bracket has a corresponding open bracket of the same type.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Check for Balance Parentheses in Java?<\/strong><\/h2>\n\n\n\n<p>Here is the step-by-step approach to check for balance paratheses:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In order to check the balancing of parentheses the best data structure to use is stack.<\/li>\n\n\n\n<li>Now, we loop over all the characters of the string and one-by-one push them onto the stack.<\/li>\n\n\n\n<li>So if the stack is empty we push the bracket or character of string into the stack.<\/li>\n\n\n\n<li>Now if the character of the string is an open parentheses we push it into the stack.<\/li>\n\n\n\n<li>If we encounter closed parentheses, we check if the top of the stack contains parentheses of the same type or not. If it doesn&#8217;t, we return false else we continue.&nbsp;<\/li>\n\n\n\n<li>At the end, if the stack is empty, implies that the parentheses were balanced, so we return true.<\/li>\n<\/ol>\n\n\n\n<p>Below is the Java Program to implement the above algorithm:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-java&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;Java&quot;,&quot;modeName&quot;:&quot;java&quot;}\">import java.util.*;\n\nclass HelloWorld {\n\u00a0\u00a0\u00a0public static void main(String[] args) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0String s1 = &quot;()[]{}&quot;;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0String s2 = &quot;({)}[]&quot;;\n \n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(isValid(s1)) System.out.println(s1 + &quot; has Balanced Parentheses&quot;);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else System.out.println(s1 + &quot; doesn't have Balanced Parentheses&quot;);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(isValid(s2)) System.out.println(s2 + &quot; has Balanced Parentheses&quot;);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else System.out.println(s2 + &quot; doesn't have Balanced Parentheses&quot;);\n\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0public static boolean isValid(String s) {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Stack&lt;Character&gt; stack = new Stack&lt;&gt;();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for(int i =0 ;i &lt; s.length(); i++){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0char ch = s.charAt(i);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(stack.size() == 0){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0stack.push(ch);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0continue;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(ch == '{' ||ch == '(' ||ch == '['){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0stack.push(ch);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}else{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0char ch1 = stack.peek();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(ch1 == '(' &amp;&amp; ch == ')'){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0stack.pop();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else if(ch1 == '{' &amp;&amp; ch == '}'){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0stack.pop();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else if(ch1 == '[' &amp;&amp; ch == ']'){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0stack.pop();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}else{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0stack.push(ch);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(stack.size() == 0){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return true;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return false;\n\u00a0\u00a0\u00a0}\n}<\/pre><\/div>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p>()[]{} has Balanced Parentheses<\/p>\n\n\n\n<p>({)}[] doesn&#8217;t have Balanced Parentheses<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Illustration with Example<\/strong><\/h3>\n\n\n\n<p>Given a string s, say, &#8220;([{}])&#8221;.<\/p>\n\n\n\n<p>As the stack is empty, we push 1st character, i.e. &#8216;(&#8216; into the stack.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-1-1024x512.jpg\" alt=\"balanced parantheses example 1\" class=\"wp-image-15\" srcset=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-1-1024x512.jpg 1024w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-1-300x150.jpg 300w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-1-768x384.jpg 768w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-1-360x180.jpg 360w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-1-750x375.jpg 750w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-1-1140x570.jpg 1140w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-1.jpg 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Now, as the next character is open parentheses,i.e. &#8216;[&#8216;, we push it into the stack.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-2-1024x512.jpg\" alt=\"example 2\" class=\"wp-image-16\" srcset=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-2-1024x512.jpg 1024w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-2-300x150.jpg 300w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-2-768x384.jpg 768w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-2-360x180.jpg 360w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-2-750x375.jpg 750w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-2-1140x570.jpg 1140w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-2.jpg 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Again, the next character is open parentheses,i.e., &#8216;{&#8216; we push it into the stack.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-3-1024x512.jpg\" alt=\"example 3\" class=\"wp-image-17\" srcset=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-3-1024x512.jpg 1024w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-3-300x150.jpg 300w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-3-768x384.jpg 768w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-3-360x180.jpg 360w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-3-750x375.jpg 750w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-3-1140x570.jpg 1140w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-3.jpg 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Now we encounter closed parentheses,i.e., &#8216;}&#8217;.We peek into the stack, and as the top of the stack contains open parentheses of the same type, we pop it from the stack.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-4-1024x512.jpg\" alt=\"example 4\" class=\"wp-image-18\" srcset=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-4-1024x512.jpg 1024w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-4-300x150.jpg 300w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-4-768x384.jpg 768w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-4-360x180.jpg 360w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-4-750x375.jpg 750w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-4-1140x570.jpg 1140w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-4.jpg 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Again we encounter closed parentheses, i.e., &#8216;]&#8217;. As the top contains parentheses of the same type, we pop.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-5-1024x512.jpg\" alt=\"example 5\" class=\"wp-image-19\" srcset=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-5-1024x512.jpg 1024w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-5-300x150.jpg 300w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-5-768x384.jpg 768w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-5-360x180.jpg 360w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-5-750x375.jpg 750w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-5-1140x570.jpg 1140w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-5.jpg 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Again we encounter closed parentheses, i.e., &#8216;)&#8217;. As the top contains parentheses of the same type, we pop.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-6-1024x512.jpg\" alt=\"example 6\" class=\"wp-image-20\" srcset=\"https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-6-1024x512.jpg 1024w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-6-300x150.jpg 300w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-6-768x384.jpg 768w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-6-360x180.jpg 360w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-6-750x375.jpg 750w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-6-1140x570.jpg 1140w, https:\/\/favtutor.com\/articles\/wp-content\/uploads\/2023\/10\/Balanced-Parentheses-Java-6.jpg 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>As the stack gets empty, we return true.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Time and space Complexity&nbsp;<\/strong><\/h3>\n\n\n\n<p><strong>The time complexity for checking balanced parentheses is O(n), where n is the length of the input string.<\/strong> This is because the code iterates over each character in the string exactly once.<\/p>\n\n\n\n<p>The space complexity of the code is O(n), where n is the length of the input string. This is because the code uses a stack to store the opening parentheses encountered. In the worst case, if all the characters in the string are opening parentheses, the stack will have a maximum of n\/2 elements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Role of Balanced Parentheses in Programming<\/strong><\/h3>\n\n\n\n<p>Here are the main use cases you should know about:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Syntax Validation<\/strong>: One of the primary roles of balanced parentheses is to validate the syntax of programming languages. They define the correct structure and grouping of code elements. A missing or misplaced parenthesis can lead to syntax errors that prevent the code from compiling or executing.<\/li>\n\n\n\n<li><strong>Precedence and Evaluation<\/strong>: Balanced parentheses enforce the order of precedence in mathematical expressions. They determine which sub-expressions are evaluated first, ensuring the desired outcome. Without balanced parentheses, the evaluation may produce incorrect or unexpected results.<\/li>\n\n\n\n<li><strong>Code Blocks and Control Flow<\/strong>: Parentheses are used to define code blocks within conditional statements and loops. A well-balanced structure ensures that the appropriate code is executed based on the condition&#8217;s outcome. Incorrectly balanced parentheses can lead to logical errors or unintended program behavior.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Balanced parentheses are fundamental in programming, ensuring code integrity and proper execution. They validate syntax, govern precedence, and control the flow of code blocks. Still confused? no worries, connect with our experts online for any type of<a href=\"https:\/\/favtutor.com\/java-homework-help\"> Java homework help<\/a>. We are always happy to assist you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is the complete algorithm and Java program to solve the Balanced Parethneses problem.<\/p>\n","protected":false},"author":8,"featured_media":153,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jnews-multi-image_gallery":[],"jnews_single_post":null,"jnews_primary_category":{"id":"","hide":""},"footnotes":""},"categories":[3],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":5,"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":6322,"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/posts\/14\/revisions\/6322"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/media\/153"}],"wp:attachment":[{"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/favtutor.com\/articles\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}