{"id":943,"date":"2025-04-11T09:06:22","date_gmt":"2025-04-11T08:06:22","guid":{"rendered":"https:\/\/debuggersspace.com\/?p=943"},"modified":"2025-04-11T09:06:22","modified_gmt":"2025-04-11T08:06:22","slug":"30-algorithm-challenges-in-c-with-real-world-examples-code","status":"publish","type":"post","link":"https:\/\/debuggersspace.com\/index.php\/2025\/04\/11\/30-algorithm-challenges-in-c-with-real-world-examples-code\/","title":{"rendered":"30 Algorithm Challenges in C# (With Real-World Examples &#038; Code)"},"content":{"rendered":"<div class='booster-block booster-read-block'>\n                <div class=\"twp-read-time\">\n                \t<i class=\"booster-icon twp-clock\"><\/i> <span>Read Time:<\/span>19 Minute, 9 Second                <\/div>\n\n            <\/div><h1><strong><b>\u2728 Part 1: Linked Lists &amp; Arrays (Problems 1\u20135)<\/b><\/strong><\/h1>\n<h2><strong><b>\u2705 1. Reverse a Linked List<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nYou are given the head of a singly linked list. You need to reverse the list so that the last node becomes the first, and each node points to the previous one.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nWe\u2019ll use three pointers:<br \/>\n&#8211; prev (initially null),<br \/>\n&#8211; current (starts from head),<br \/>\n&#8211; next (temporarily stores the next node).<br \/>\nWe loop through the list and reverse each pointer one by one.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class ListNode<br \/>\n{<br \/>\npublic int val;<br \/>\npublic ListNode next;<br \/>\npublic ListNode(int val = 0, ListNode next = null)<br \/>\n{<br \/>\nthis.val = val;<br \/>\nthis.next = next;<br \/>\n}<br \/>\n}<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic ListNode ReverseList(ListNode head)<br \/>\n{<br \/>\nListNode prev = null;<br \/>\nListNode current = head;<\/p>\n<p>while (current != null)<br \/>\n{<br \/>\nListNode next = current.next;<br \/>\ncurrent.next = prev;<br \/>\nprev = current;<br \/>\ncurrent = next;<br \/>\n}<\/p>\n<p>return prev;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe reverse the list by adjusting the next pointer of each node to point to the previous node. At the end of the loop, prev becomes the new head of the reversed list.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 2. Check if a String Has All Unique Characters<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nYou are given a string. Check if all characters in the string are unique \u2014 no character should repeat.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse a simple nested loop to compare each character with the rest (no dictionaries used).<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic bool HasAllUniqueCharacters(string input)<br \/>\n{<br \/>\nfor (int i = 0; i &lt; input.Length; i++)<br \/>\n{<br \/>\nfor (int j = i + 1; j &lt; input.Length; j++)<br \/>\n{<br \/>\nif (input[i] == input[j])<br \/>\nreturn false;<br \/>\n}<br \/>\n}<br \/>\nreturn true;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe loop through every character and compare it with all characters after it. If we find any repetition, return false.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 3. Find the Missing Number in an Array<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nYou are given an array of n distinct numbers from 0 to n. One number is missing. Find that missing number.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nCalculate the sum of numbers from 0 to n using the formula: sum = n * (n + 1) \/ 2. Then subtract the sum of the given array.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic int FindMissingNumber(int[] nums)<br \/>\n{<br \/>\nint n = nums.Length;<br \/>\nint totalSum = n * (n + 1) \/ 2;<br \/>\nint arraySum = 0;<\/p>\n<p>for (int i = 0; i &lt; nums.Length; i++)<br \/>\n{<br \/>\narraySum += nums[i];<br \/>\n}<\/p>\n<p>return totalSum &#8211; arraySum;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nThe difference between expected total and actual total gives us the missing number in the range.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 4. Validate if a String Has Balanced Parentheses<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nYou are given a string containing parentheses \u2014 (), {}, []. Check whether the string is balanced, meaning every opening has a corresponding closing bracket in the correct order.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse a manual stack simulation (array + pointer) to push opening brackets and pop them on matching closing ones.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic bool IsBalanced(string s)<br \/>\n{<br \/>\nchar[] stack = new char[s.Length];<br \/>\nint top = -1;<\/p>\n<p>foreach (char ch in s)<br \/>\n{<br \/>\nif (ch == &#8216;(&#8216; || ch == &#8216;{&#8216; || ch == &#8216;[&#8216;)<br \/>\n{<br \/>\nstack[++top] = ch;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nif (top == -1) return false;<\/p>\n<p>char open = stack[top&#8211;];<\/p>\n<p>if ((ch == &#8216;)&#8217; &amp;&amp; open != &#8216;(&#8216;) ||<br \/>\n(ch == &#8216;}&#8217; &amp;&amp; open != &#8216;{&#8216;) ||<br \/>\n(ch == &#8216;]&#8217; &amp;&amp; open != &#8216;[&#8216;))<br \/>\n{<br \/>\nreturn false;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>return top == -1;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe push opening brackets and pop on matching closings. If mismatch or leftover items exist in the stack, the string is not balanced.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 5. Merge Two Sorted Arrays<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nYou are given two sorted arrays. Merge them into one sorted array.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse two pointers to compare both arrays and insert smaller elements one by one into a result array.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic int[] MergeSortedArrays(int[] arr1, int[] arr2)<br \/>\n{<br \/>\nint[] result = new int[arr1.Length + arr2.Length];<br \/>\nint i = 0, j = 0, k = 0;<\/p>\n<p>while (i &lt; arr1.Length &amp;&amp; j &lt; arr2.Length)<br \/>\n{<br \/>\nif (arr1[i] &lt; arr2[j])<br \/>\nresult[k++] = arr1[i++];<br \/>\nelse<br \/>\nresult[k++] = arr2[j++];<br \/>\n}<\/p>\n<p>while (i &lt; arr1.Length)<br \/>\nresult[k++] = arr1[i++];<\/p>\n<p>while (j &lt; arr2.Length)<br \/>\nresult[k++] = arr2[j++];<\/p>\n<p>return result;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe maintain three indices. The smallest current element is copied into the result array. Remaining items (if any) are copied after one array finishes.<\/p>\n<h1><strong><b>\u2728 Part 2: String &amp; Pattern Problems (Problems 6\u201310)<\/b><\/strong><\/h1>\n<h2><strong><b>\u2705 6. Validate Palindrome (case-insensitive, ignore punctuation)<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven a string, check whether it is a palindrome. A palindrome reads the same backward as forward. Ignore cases and non-alphanumeric characters.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nWe can use two pointers: one starting from the beginning and one from the end. Skip characters that are not letters or digits and compare the remaining ones in lowercase.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic bool IsPalindrome(string s)<br \/>\n{<br \/>\nint left = 0, right = s.Length &#8211; 1;<\/p>\n<p>while (left &lt; right)<br \/>\n{<br \/>\nwhile (left &lt; right &amp;&amp; !char.IsLetterOrDigit(s[left])) left++;<br \/>\nwhile (left &lt; right &amp;&amp; !char.IsLetterOrDigit(s[right])) right&#8211;;<\/p>\n<p>if (char.ToLower(s[left]) != char.ToLower(s[right]))<br \/>\nreturn false;<\/p>\n<p>left++;<br \/>\nright&#8211;;<br \/>\n}<\/p>\n<p>return true;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe skip non-alphanumeric characters and compare the valid ones after converting to lowercase. If all characters match as we move inward, it\u2019s a palindrome.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 7. Reverse Words in a Sentence (preserve character order)<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nYou are given a string containing words separated by spaces. Reverse the words&#8217; positions while preserving the characters inside each word.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nSplit the string by spaces, reverse the array of words, then join them back together with a single space.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic string ReverseWords(string sentence)<br \/>\n{<br \/>\nstring[] words = sentence.Split(&#8216; &#8216;);<br \/>\nArray.Reverse(words);<br \/>\nreturn string.Join(&#8221; &#8220;, words);<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe split the sentence into an array of words, reverse the array, and rejoin the words using spaces.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 8. Remove Duplicate Words from an Array<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven an array of words, remove all duplicate words and return the result.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse a simple loop to add only the first occurrence of each word to the result array.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic string[] RemoveDuplicates(string[] words)<br \/>\n{<br \/>\nList&lt;string&gt; result = new List&lt;string&gt;();<\/p>\n<p>for (int i = 0; i &lt; words.Length; i++)<br \/>\n{<br \/>\nbool found = false;<br \/>\nfor (int j = 0; j &lt; result.Count; j++)<br \/>\n{<br \/>\nif (result[j] == words[i])<br \/>\n{<br \/>\nfound = true;<br \/>\nbreak;<br \/>\n}<br \/>\n}<br \/>\nif (!found)<br \/>\nresult.Add(words[i]);<br \/>\n}<\/p>\n<p>return result.ToArray();<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe check each word against the result list. If not already present, we add it. This avoids using HashSet or dictionary.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 9. Count Occurrences of Characters (case-insensitive)<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven a string, count how many times each character appears. Treat uppercase and lowercase letters as the same.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nWe loop through each character and use an array of size 26 to store counts, treating both upper and lower case as the same index.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic int[] CountCharacterOccurrences(string input)<br \/>\n{<br \/>\nint[] counts = new int[26];<\/p>\n<p>foreach (char ch in input.ToLower())<br \/>\n{<br \/>\nif (ch &gt;= &#8216;a&#8217; &amp;&amp; ch &lt;= &#8216;z&#8217;)<br \/>\n{<br \/>\ncounts[ch &#8211; &#8216;a&#8217;]++;<br \/>\n}<br \/>\n}<\/p>\n<p>return counts;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe convert the string to lowercase and count characters using a fixed-size array. Each index corresponds to a letter a\u2013z.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 10. Find the Longest Word in a Sentence<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven a sentence, return the longest word in it. If multiple words have the same maximum length, return the first one.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nSplit the sentence into words and check the length of each, keeping track of the longest one found so far.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic string FindLongestWord(string sentence)<br \/>\n{<br \/>\nstring[] words = sentence.Split(&#8216; &#8216;);<br \/>\nstring longest = &#8220;&#8221;;<\/p>\n<p>foreach (string word in words)<br \/>\n{<br \/>\nif (word.Length &gt; longest.Length)<br \/>\n{<br \/>\nlongest = word;<br \/>\n}<br \/>\n}<\/p>\n<p>return longest;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe split the sentence into words and loop through them to find the one with the maximum length.<\/p>\n<h1><strong><b>\u2728 Part 3: Math &amp; Number Logic (Problems 11\u201315)<\/b><\/strong><\/h1>\n<h2><strong><b>\u2705 11. Generate Fibonacci in Reverse<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGenerate the first n numbers of the Fibonacci series and return them in reverse order.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nCalculate the Fibonacci numbers in a loop and store them in an array, then reverse the array before returning.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic int[] ReverseFibonacci(int n)<br \/>\n{<br \/>\nif (n &lt;= 0) return new int[0];<br \/>\nif (n == 1) return new int[] { 0 };<\/p>\n<p>int[] fib = new int[n];<br \/>\nfib[0] = 0;<br \/>\nfib[1] = 1;<\/p>\n<p>for (int i = 2; i &lt; n; i++)<br \/>\n{<br \/>\nfib[i] = fib[i &#8211; 1] + fib[i &#8211; 2];<br \/>\n}<\/p>\n<p>Array.Reverse(fib);<br \/>\nreturn fib;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe build the Fibonacci sequence iteratively and reverse it at the end using Array.Reverse.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 12. Find Zero-Sum Pairs<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven an array of integers, find all unique pairs that sum to zero.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse nested loops to check all pairs (i, j) where i &lt; j and arr[i] + arr[j] == 0.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic List&lt;(int, int)&gt; FindZeroSumPairs(int[] nums)<br \/>\n{<br \/>\nList&lt;(int, int)&gt; result = new List&lt;(int, int)&gt;();<\/p>\n<p>for (int i = 0; i &lt; nums.Length; i++)<br \/>\n{<br \/>\nfor (int j = i + 1; j &lt; nums.Length; j++)<br \/>\n{<br \/>\nif (nums[i] + nums[j] == 0)<br \/>\n{<br \/>\nresult.Add((nums[i], nums[j]));<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>return result;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe compare each pair in the array and collect the pairs where the sum is zero. This is a brute-force approach without using extra data structures.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 13. Prime Number Checker<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nCheck whether a given number is a prime number or not.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nA number is prime if it is greater than 1 and divisible only by 1 and itself. We check for divisibility up to the square root of the number.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic bool IsPrime(int num)<br \/>\n{<br \/>\nif (num &lt;= 1) return false;<\/p>\n<p>for (int i = 2; i * i &lt;= num; i++)<br \/>\n{<br \/>\nif (num % i == 0) return false;<br \/>\n}<\/p>\n<p>return true;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe check divisibility from 2 up to the square root of the number. If divisible, it&#8217;s not prime.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 14. Factorial using Recursion<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nWrite a program to compute the factorial of a number using recursion.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nFactorial of n is defined as n * factorial(n-1). The base case is factorial(0) = 1.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic int Factorial(int n)<br \/>\n{<br \/>\nif (n == 0) return 1;<br \/>\nreturn n * Factorial(n &#8211; 1);<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nThe function calls itself with a decremented value of n until it reaches 0, at which point it returns 1.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 15. Merge Two Sorted Arrays without Duplicates<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nYou are given two sorted arrays. Merge them into one sorted array without duplicates.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse two pointers to merge the arrays and skip duplicates while inserting into the result.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic List&lt;int&gt; MergeSortedUnique(int[] arr1, int[] arr2)<br \/>\n{<br \/>\nList&lt;int&gt; result = new List&lt;int&gt;();<br \/>\nint i = 0, j = 0;<\/p>\n<p>while (i &lt; arr1.Length &amp;&amp; j &lt; arr2.Length)<br \/>\n{<br \/>\nif (arr1[i] &lt; arr2[j])<br \/>\n{<br \/>\nif (result.Count == 0 || result[result.Count &#8211; 1] != arr1[i])<br \/>\nresult.Add(arr1[i]);<br \/>\ni++;<br \/>\n}<br \/>\nelse if (arr1[i] &gt; arr2[j])<br \/>\n{<br \/>\nif (result.Count == 0 || result[result.Count &#8211; 1] != arr2[j])<br \/>\nresult.Add(arr2[j]);<br \/>\nj++;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nif (result.Count == 0 || result[result.Count &#8211; 1] != arr1[i])<br \/>\nresult.Add(arr1[i]);<br \/>\ni++;<br \/>\nj++;<br \/>\n}<br \/>\n}<\/p>\n<p>while (i &lt; arr1.Length)<br \/>\n{<br \/>\nif (result.Count == 0 || result[result.Count &#8211; 1] != arr1[i])<br \/>\nresult.Add(arr1[i]);<br \/>\ni++;<br \/>\n}<\/p>\n<p>while (j &lt; arr2.Length)<br \/>\n{<br \/>\nif (result.Count == 0 || result[result.Count &#8211; 1] != arr2[j])<br \/>\nresult.Add(arr2[j]);<br \/>\nj++;<br \/>\n}<\/p>\n<p>return result;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe use two pointers to compare values and only insert them into the result if they are not duplicates.<\/p>\n<h1><strong><b>\u2728 Part 4: Search, Sort, and Lookup (Problems 16\u201320)<\/b><\/strong><\/h1>\n<h2><strong><b>\u2705 16. Binary Search on a Sorted Array<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven a sorted array and a target value, return the index of the target if found. If not found, return -1.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse the binary search technique: repeatedly divide the search interval in half, comparing the middle value to the target.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic int BinarySearch(int[] nums, int target)<br \/>\n{<br \/>\nint left = 0, right = nums.Length &#8211; 1;<\/p>\n<p>while (left &lt;= right)<br \/>\n{<br \/>\nint mid = left + (right &#8211; left) \/ 2;<\/p>\n<p>if (nums[mid] == target)<br \/>\nreturn mid;<br \/>\nelse if (nums[mid] &lt; target)<br \/>\nleft = mid + 1;<br \/>\nelse<br \/>\nright = mid &#8211; 1;<br \/>\n}<\/p>\n<p>return -1;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe narrow the search space by half on each iteration. This gives a time complexity of O(log n).<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 17. Find First Non-Repeating Character<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven a string, return the first character that does not repeat. If all characters repeat, return a space or indicator.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse two loops: one to count occurrences of each character, and another to find the first character with a count of 1.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic char FirstNonRepeatingCharacter(string s)<br \/>\n{<br \/>\nint[] freq = new int[256];<\/p>\n<p>foreach (char c in s)<br \/>\n{<br \/>\nfreq[c]++;<br \/>\n}<\/p>\n<p>foreach (char c in s)<br \/>\n{<br \/>\nif (freq[c] == 1)<br \/>\nreturn c;<br \/>\n}<\/p>\n<p>return &#8216; &#8216;;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe count each character using an array. Then we check in original order for the first one with a count of 1.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 18. Two Sum Problem<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven an array of integers and a target sum, return the indices of the two numbers that add up to the target.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse nested loops to check every pair of elements. If their sum equals the target, return their indices.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic int[] TwoSum(int[] nums, int target)<br \/>\n{<br \/>\nfor (int i = 0; i &lt; nums.Length; i++)<br \/>\n{<br \/>\nfor (int j = i + 1; j &lt; nums.Length; j++)<br \/>\n{<br \/>\nif (nums[i] + nums[j] == target)<br \/>\nreturn new int[] { i, j };<br \/>\n}<br \/>\n}<\/p>\n<p>return new int[] { -1, -1 };<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe check each possible pair of numbers. Once we find two numbers whose sum equals the target, we return their indices.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 19. Group Anagrams<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven an array of strings, group the anagrams together. Words are anagrams if they have the same characters in any order.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nSort each word and compare. Words with the same sorted value are anagrams. Group them manually into lists.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic List&lt;List&lt;string&gt;&gt; GroupAnagrams(string[] strs)<br \/>\n{<br \/>\nList&lt;List&lt;string&gt;&gt; result = new List&lt;List&lt;string&gt;&gt;();<br \/>\nbool[] visited = new bool[strs.Length];<\/p>\n<p>for (int i = 0; i &lt; strs.Length; i++)<br \/>\n{<br \/>\nif (visited[i]) continue;<\/p>\n<p>List&lt;string&gt; group = new List&lt;string&gt; { strs[i] };<br \/>\nvisited[i] = true;<\/p>\n<p>for (int j = i + 1; j &lt; strs.Length; j++)<br \/>\n{<br \/>\nif (!visited[j] &amp;&amp; IsAnagram(strs[i], strs[j]))<br \/>\n{<br \/>\ngroup.Add(strs[j]);<br \/>\nvisited[j] = true;<br \/>\n}<br \/>\n}<\/p>\n<p>result.Add(group);<br \/>\n}<\/p>\n<p>return result;<br \/>\n}<\/p>\n<p>private bool IsAnagram(string s1, string s2)<br \/>\n{<br \/>\nchar[] a = s1.ToCharArray();<br \/>\nchar[] b = s2.ToCharArray();<br \/>\nArray.Sort(a);<br \/>\nArray.Sort(b);<br \/>\nreturn new string(a) == new string(b);<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe check each word against others to see if they are anagrams by comparing sorted character arrays. Group matches together.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 20. Find Intersection of Two Arrays<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven two arrays, return the intersection (common elements) between them without duplicates.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse nested loops to compare each element of the first array with the second and add only unique matches to the result.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic List&lt;int&gt; Intersection(int[] nums1, int[] nums2)<br \/>\n{<br \/>\nList&lt;int&gt; result = new List&lt;int&gt;();<\/p>\n<p>for (int i = 0; i &lt; nums1.Length; i++)<br \/>\n{<br \/>\nfor (int j = 0; j &lt; nums2.Length; j++)<br \/>\n{<br \/>\nif (nums1[i] == nums2[j] &amp;&amp; !result.Contains(nums1[i]))<br \/>\n{<br \/>\nresult.Add(nums1[i]);<br \/>\nbreak;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>return result;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe use nested loops to find common elements and check if the result already contains the value to avoid duplicates.<\/p>\n<h1><strong><b>\u2728 Part 5: Stack, Queue, and Recursion (Problems 21\u201325)<\/b><\/strong><\/h1>\n<h2><strong><b>\u2705 21. Evaluate Reverse Polish Notation<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven an array of strings representing Reverse Polish Notation (RPN), evaluate the expression and return the result.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse a stack to process the tokens. Push numbers onto the stack and apply operations by popping two elements when an operator is found.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic int EvalRPN(string[] tokens)<br \/>\n{<br \/>\nStack&lt;int&gt; stack = new Stack&lt;int&gt;();<\/p>\n<p>foreach (string token in tokens)<br \/>\n{<br \/>\nif (int.TryParse(token, out int num))<br \/>\n{<br \/>\nstack.Push(num);<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nint b = stack.Pop();<br \/>\nint a = stack.Pop();<br \/>\nswitch (token)<br \/>\n{<br \/>\ncase &#8220;+&#8221;: stack.Push(a + b); break;<br \/>\ncase &#8220;-&#8220;: stack.Push(a &#8211; b); break;<br \/>\ncase &#8220;*&#8221;: stack.Push(a * b); break;<br \/>\ncase &#8220;\/&#8221;: stack.Push(a \/ b); break;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>return stack.Pop();<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe use a stack to hold operands and apply operations in LIFO order. For each operator, we pop two numbers, compute the result, and push it back.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 22. Min Stack<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nDesign a stack that supports push, pop, top, and retrieving the minimum element in constant time.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse an additional stack to track the current minimum after each operation.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class MinStack<br \/>\n{<br \/>\nprivate Stack&lt;int&gt; stack = new Stack&lt;int&gt;();<br \/>\nprivate Stack&lt;int&gt; minStack = new Stack&lt;int&gt;();<\/p>\n<p>public void Push(int val)<br \/>\n{<br \/>\nstack.Push(val);<br \/>\nif (minStack.Count == 0 || val &lt;= minStack.Peek())<br \/>\nminStack.Push(val);<br \/>\n}<\/p>\n<p>public void Pop()<br \/>\n{<br \/>\nif (stack.Pop() == minStack.Peek())<br \/>\nminStack.Pop();<br \/>\n}<\/p>\n<p>public int Top()<br \/>\n{<br \/>\nreturn stack.Peek();<br \/>\n}<\/p>\n<p>public int GetMin()<br \/>\n{<br \/>\nreturn minStack.Peek();<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe maintain a secondary stack that tracks the minimum values. It gets updated only when a smaller or equal value is pushed.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 23. Implement Queue using Stacks<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nImplement a queue using two stacks with methods: enqueue, dequeue, and peek.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse two stacks. One for enqueue (input stack), and the other for dequeue (output stack). Transfer elements only when needed.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class MyQueue<br \/>\n{<br \/>\nprivate Stack&lt;int&gt; input = new Stack&lt;int&gt;();<br \/>\nprivate Stack&lt;int&gt; output = new Stack&lt;int&gt;();<\/p>\n<p>public void Enqueue(int x)<br \/>\n{<br \/>\ninput.Push(x);<br \/>\n}<\/p>\n<p>public int Dequeue()<br \/>\n{<br \/>\nif (output.Count == 0)<br \/>\n{<br \/>\nwhile (input.Count &gt; 0)<br \/>\n{<br \/>\noutput.Push(input.Pop());<br \/>\n}<br \/>\n}<br \/>\nreturn output.Pop();<br \/>\n}<\/p>\n<p>public int Peek()<br \/>\n{<br \/>\nif (output.Count == 0)<br \/>\n{<br \/>\nwhile (input.Count &gt; 0)<br \/>\n{<br \/>\noutput.Push(input.Pop());<br \/>\n}<br \/>\n}<br \/>\nreturn output.Peek();<br \/>\n}<\/p>\n<p>public bool Empty()<br \/>\n{<br \/>\nreturn input.Count == 0 &amp;&amp; output.Count == 0;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nThis approach amortizes cost by transferring elements only when necessary, making operations efficient over time.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 24. Recursively Reverse a String<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nReverse a given string using recursion and return the result.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse the recursive approach: reverse(s) = reverse(substring from index 1) + first character.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic string ReverseString(string s)<br \/>\n{<br \/>\nif (s.Length &lt;= 1) return s;<br \/>\nreturn ReverseString(s.Substring(1)) + s[0];<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe recursively call the function on the substring and append the first character at the end until the string is fully reversed.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 25. Valid Parentheses (Deep Nesting)<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven a string with only parentheses characters, determine if it&#8217;s valid (properly nested and matched).<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse a stack to push opening brackets and pop when encountering the correct closing bracket.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic bool IsValid(string s)<br \/>\n{<br \/>\nStack&lt;char&gt; stack = new Stack&lt;char&gt;();<\/p>\n<p>foreach (char c in s)<br \/>\n{<br \/>\nif (c == &#8216;(&#8216; || c == &#8216;{&#8216; || c == &#8216;[&#8216;)<br \/>\nstack.Push(c);<br \/>\nelse<br \/>\n{<br \/>\nif (stack.Count == 0) return false;<br \/>\nchar top = stack.Pop();<br \/>\nif ((c == &#8216;)&#8217; &amp;&amp; top != &#8216;(&#8216;) ||<br \/>\n(c == &#8216;}&#8217; &amp;&amp; top != &#8216;{&#8216;) ||<br \/>\n(c == &#8216;]&#8217; &amp;&amp; top != &#8216;[&#8216;))<br \/>\nreturn false;<br \/>\n}<br \/>\n}<\/p>\n<p>return stack.Count == 0;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nThe stack helps track open brackets. Each closing bracket must match the top of the stack to be valid. Deep nesting works as long as order is preserved.<\/p>\n<h1><strong><b>\u2728 Part 6: Bonus Challenges (Problems 26\u201330)<\/b><\/strong><\/h1>\n<h2><strong><b>\u2705 26. Move Zeroes to the End<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven an array, move all zeroes to the end while maintaining the relative order of the non-zero elements.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse two pointers: one for current element, another for tracking non-zero placement index. Swap when needed.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic void MoveZeroes(int[] nums)<br \/>\n{<br \/>\nint index = 0;<\/p>\n<p>for (int i = 0; i &lt; nums.Length; i++)<br \/>\n{<br \/>\nif (nums[i] != 0)<br \/>\n{<br \/>\nnums[index++] = nums[i];<br \/>\n}<br \/>\n}<\/p>\n<p>while (index &lt; nums.Length)<br \/>\n{<br \/>\nnums[index++] = 0;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nWe shift all non-zero elements to the front and then fill the remaining array with zeroes.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 27. Find Duplicates in an Array<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven an array of integers, find all elements that appear more than once.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse a nested loop to compare each element with the rest, and add to the result list if not already added.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic List&lt;int&gt; FindDuplicates(int[] nums)<br \/>\n{<br \/>\nList&lt;int&gt; duplicates = new List&lt;int&gt;();<\/p>\n<p>for (int i = 0; i &lt; nums.Length; i++)<br \/>\n{<br \/>\nfor (int j = i + 1; j &lt; nums.Length; j++)<br \/>\n{<br \/>\nif (nums[i] == nums[j] &amp;&amp; !duplicates.Contains(nums[i]))<br \/>\n{<br \/>\nduplicates.Add(nums[i]);<br \/>\nbreak;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>return duplicates;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nEach element is compared to every other. When a duplicate is found, it&#8217;s added to a result list only once.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 28. Rotate Matrix 90 Degrees<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven an NxN 2D matrix, rotate it 90 degrees clockwise in place.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nFirst transpose the matrix (swap rows with columns), then reverse each row.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic void Rotate(int[][] matrix)<br \/>\n{<br \/>\nint n = matrix.Length;<\/p>\n<p>\/\/ Transpose<br \/>\nfor (int i = 0; i &lt; n; i++)<br \/>\n{<br \/>\nfor (int j = i + 1; j &lt; n; j++)<br \/>\n{<br \/>\nint temp = matrix[i][j];<br \/>\nmatrix[i][j] = matrix[j][i];<br \/>\nmatrix[j][i] = temp;<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/ Reverse each row<br \/>\nfor (int i = 0; i &lt; n; i++)<br \/>\n{<br \/>\nArray.Reverse(matrix[i]);<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nTransposing flips the matrix diagonally. Reversing each row completes the 90-degree clockwise rotation.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 29. Pascal\u2019s Triangle<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nGiven a number of rows, generate Pascal\u2019s Triangle up to that row.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nBuild each row based on the previous row. The first and last values of each row are 1. Middle values are sum of two numbers above.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic List&lt;List&lt;int&gt;&gt; GeneratePascalTriangle(int numRows)<br \/>\n{<br \/>\nList&lt;List&lt;int&gt;&gt; triangle = new List&lt;List&lt;int&gt;&gt;();<\/p>\n<p>for (int i = 0; i &lt; numRows; i++)<br \/>\n{<br \/>\nList&lt;int&gt; row = new List&lt;int&gt;();<br \/>\nfor (int j = 0; j &lt;= i; j++)<br \/>\n{<br \/>\nif (j == 0 || j == i)<br \/>\nrow.Add(1);<br \/>\nelse<br \/>\nrow.Add(triangle[i &#8211; 1][j &#8211; 1] + triangle[i &#8211; 1][j]);<br \/>\n}<br \/>\ntriangle.Add(row);<br \/>\n}<\/p>\n<p>return triangle;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nEach row is formed by adding adjacent values from the row above. The first and last values are always 1.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><b>\u2705 30. Maximum Subarray (Kadane\u2019s Algorithm)<\/b><\/strong><\/h2>\n<p>\ufffd\ufffd\ufffd Problem Statement:<br \/>\nFind the contiguous subarray within an array which has the largest sum.<\/p>\n<p>\ufffd\ufffd\ufffd Approach:<br \/>\nUse Kadane\u2019s algorithm to track current max and global max as we iterate through the array.<\/p>\n<p>\ufffd\ufffd\ufffd Program (C#):<\/p>\n<p>public class Solution<br \/>\n{<br \/>\npublic int MaxSubArray(int[] nums)<br \/>\n{<br \/>\nint maxSoFar = nums[0], maxEndingHere = nums[0];<\/p>\n<p>for (int i = 1; i &lt; nums.Length; i++)<br \/>\n{<br \/>\nmaxEndingHere = Math.Max(nums[i], maxEndingHere + nums[i]);<br \/>\nmaxSoFar = Math.Max(maxSoFar, maxEndingHere);<br \/>\n}<\/p>\n<p>return maxSoFar;<br \/>\n}<br \/>\n}<\/p>\n<p>\ufffd\ufffd\ufffd Explanation:<br \/>\nAt each step, we calculate whether to include the current element in the existing subarray or start a new one.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2728 Part 1: Linked Lists &amp; Arrays (Problems 1\u20135) \u2705 1. Reverse a Linked List \ufffd\ufffd\ufffd Problem Statement: You are given the head of a singly linked list. You need to reverse the list so that the last node becomes the first, and each node points to the previous one. \ufffd\ufffd\ufffd Approach: We\u2019ll use three [&hellip;]<\/p>\n","protected":false},"author":43,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-943","post","type-post","status-publish","format-standard","hentry","category-blog"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Himanshu Namdeo","author_link":"https:\/\/debuggersspace.com\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"\u2728 Part 1: Linked Lists &amp; Arrays (Problems 1\u20135) \u2705 1. Reverse a Linked List \ufffd\ufffd\ufffd Problem Statement: You are given the head of a singly linked list. You need to reverse the list so that the last node becomes the first, and each node points to the previous one. \ufffd\ufffd\ufffd Approach: We\u2019ll use three&hellip;","_links":{"self":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/943"}],"collection":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/comments?post=943"}],"version-history":[{"count":1,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/943\/revisions"}],"predecessor-version":[{"id":944,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/943\/revisions\/944"}],"wp:attachment":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/media?parent=943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/categories?post=943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/tags?post=943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}