Practice the objective questions from Queue in the data structure using c, it is the best way to learn data structures and algorithms multiple choice questions from various topics like Array, MCQ on a linked list, tree, Graphs, searching algorithms in data structure & sorting algorithms in data structures. The solution provided for every question. Practice the objective questions from Queue in the data structure using c, it is the best way to learn data structures and algorithms multiple choice questions from various topics like Array, MCQ on a linked list, tree, Graphs, searching algorithms in data structure & sorting algorithms in data structures. Problem Solving with Algorithms and Data Structures, Release 3.0 Figure 1.1: Procedural Abstraction must know the details of how operating systems work, how network protocols are conﬁgured, and how to code various scripts that control function. Basics – Recursion; Recursive Functions; Tail Recursion; Strings – Given a string, print all possible palindromic partitions; Check if a number is Palindrome; Print all possible strings of length k that can be formed from a set of n characters; … C programming Exercises, Practice, Solution: C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations. of swaps of left & right child, Find Lowest Common Ancestor (LCA) of two nodes in a binary tree, Print all paths from root to leaf nodes in given binary tree, Find ancestors of given node in a Binary Tree, Find the distance between given pairs of nodes in a binary tree, Print nodes in vertical order of a given Binary Tree (Vertical Traversal), Find the diagonal sum of given binary tree, Print corner nodes of every level in binary tree, In-place convert convert given Binary Tree to Doubly Linked List, Sink nodes containing zero to the bottom of the binary tree, Convert given binary tree to full tree by removing half nodes, Truncate given binary tree to remove nodes which lie on a path having sum less than K, Find maximum sum root-to-leaf path in a binary tree, Check if given binary tree is height balanced or not, Determine if given Binary Tree is a BST or not, Check if given keys represents same BSTs or not without building the BST, Find inorder predecessor for given key in a BST, Find Lowest Common Ancestor (LCA) of two nodes in a Binary Search Tree, Find K’th smallest and K’th largest element in BST, Find optimal cost to construct binary search tree, Longest Common Subsequence | Introduction & LCS Length, Longest Common Subsequence | Space optimized version, Longest Common Subsequence of K-sequences, Longest Common Subsequence | Finding all LCS, Longest Palindromic Subsequence using Dynamic Programming, Shortest Common Supersequence | Introduction & SCS Length, Shortest Common Supersequence | Finding all SCS, Shortest Common Supersequence | Using LCS, Longest Increasing Subsequence using Dynamic Programming, The Levenshtein distance (Edit distance) problem, Find size of largest square sub-matrix of 1’s present in given binary matrix, Find the minimum cost to reach last cell of the matrix from its first cell, Find longest sequence formed by adjacent numbers in the matrix, Count number of paths in a matrix with given cost to reach destination cell, Find all N-digit binary strings without any consecutive 1’s, Count number of times a pattern appears in given string as a subsequence, Collect maximum points in a matrix by satisfying given constraints, Count total possible combinations of N-digit numbers in a mobile keypad, Find probability that a person is alive after taking N steps on the island, Calculate sum of all elements in a sub-matrix in constant time, Find maximum sum K x K sub-matrix in a given M x N matrix, Find maximum sum submatrix present in a given matrix, Single-Source Shortest Paths — Bellman Ford Algorithm, All-Pairs Shortest Paths — Floyd Warshall Algorithm, Terminology and Representations of Graphs, Graph Implementation in C++ without using STL, Breadth First Search (BFS) | Iterative & Recursive Implementation, Depth First Search (DFS) | Iterative & Recursive Implementation, Arrival and Departure Time of Vertices in DFS, Types of edges involved in DFS and relation between them, Minimum number of throws required to win Snake and Ladder game, Check if an undirected graph contains cycle or not, Total number of paths in given digraph from given source to destination having exactly m edges, Determine if an undirected graph is a Tree (Acyclic Connected Graph), Check if given digraph is a DAG (Directed Acyclic Graph) or not, Disjoint-Set Data Structure (Union-Find Algorithm), Chess Knight Problem — Find Shortest path from source to destination, Check if given Graph is Strongly Connected or not, Check if given Graph is Strongly Connected or not using one DFS Traversal, Union-Find Algorithm for Cycle Detection in undirected graph, Kruskal’s Algorithm for finding Minimum Spanning Tree, Single-Source Shortest Paths — Dijkstra’s Algorithm, Find first k maximum occurring words in given set of strings, Find first k non-repeating characters in a string in single traversal, Insert given node into the correct sorted position in the given sorted linked list, Given a linked list, change it to be in sorted order, Split the nodes of the given linked list into front and back halves, Remove duplicates from a sorted linked list, Move front node of the given list to the front of the another list, Move even nodes to the end of the list in reverse order, Split given linked list into two lists where each list containing alternating elements from it, Construct a linked list by merging alternate nodes of two given lists, Intersection of two given sorted linked lists, Reverse linked list | Part 1 (Iterative Solution), Reverse linked list | Part 2 (Recursive Solution), Reverse every group of k nodes in given linked list, Find K’th node from the end in a linked list, Merge alternate nodes of two linked lists into the first list, Merge two sorted linked lists from their end, Delete every N nodes in a linked list after skipping M nodes, Rearrange linked list in specific manner in linear time, Check if linked list is palindrome or not, Move last node to front in a given Linked List, Rearrange the linked list in specific manner, Detect Cycle in a linked list (Floyd’s Cycle Detection Algorithm), Shift all matrix elements by 1 in Spiral Order, Find Shortest path from source to destination in a matrix that satisfies given constraints, Change all elements of row i and column j in a matrix to 0 if cell (i, j) has value 0, Print diagonal elements of the matrix having positive slope, Find all paths from first cell to last cell of a matrix, Replace all occurrences of 0 that are not surrounded by 1 in a binary matrix, In-place rotate the matrix by 90 degrees in clock-wise direction, Count negative elements present in sorted matrix in linear time, Report all occurrences of an element in row wise and column wise sorted matrix in linear time, Find shortest safe route in a field with sensors present, Find all occurrences of given string in a character matrix, Travelling Salesman Problem using Branch and Bound, Group anagrams together from given list of words, Lexicographic sorting of given set of keys, Find all palindromic permutations of a string, Find all lexicographically next permutations of a string sorted in ascending order, Sort an array containing 0’s, 1’s and 2’s (Dutch national flag problem), Check if given expression is balanced expression or not, Find duplicate parenthesis in an expression, Reverse given text without reversing the individual words, Check if given set of moves is circular or not, Check if given string is a rotated palindrome or not, Longest Palindromic Substring (Non-DP Space Optimized Solution), Check if repeated subsequence is present in the string or not, Check if strings can be derived from each other by circularly rotating them, Convert given number into corresponding excel column name, Determine if two strings are anagram or not, Find all possible palindromic substrings in a string, Find all possible combinations of words formed from mobile keypad, Find all possible combinations by replacing given digits with characters of the corresponding list, Find all words from given list that follows same order of characters as given pattern, Inplace remove all occurrences of ‘AB’ and ‘C’ from the string, Longest even length palidromic sum substring, Run Length Encoding (RLE) data compression algorithm, Find the longest substring of given string containing k distinct characters, Find all substrings of a string that are permutation of a given string, Find the longest substring of given string containing all distinct characters, Find Lexicographically minimal string rotation, Find all strings of given length containing balanced parentheses, Find all N-digit binary numbers with k-bits set where k ranges from 1 to N, Find all combinations of non-overlapping substrings of a string, Check if given sentence is syntactically correct or not, Find all N-digit strictly increasing numbers (Bottom-Up and Top-Down Approach), Trie Implementation | Insert, Search and Delete, Memory efficient Trie Implementation using Map | Insert, Search and Delete, Longest Common Prefix in given set of strings (using Trie), Find maximum occurring word in given set of strings, Clock angle problem — Find angle between hour and minute hand, Add two numbers without using addition operator | 5 methods, Implement power function without using multiplication and division operators, Print all numbers between 1 to N without using semicolon, Swap two numbers without using third variable | 5 methods, Determine the if condition to print specific output, Find maximum, minimum of three numbers without using conditional statement and ternary operator | 4 methods, Find numbers represented as sum of two cubes for two different pairs, Print “Hello World” with empty main() function | 3 methods, Print all numbers between 1 to N without using any loop | 4 methods, Print a semicolon without using semicolon anywhere in the program, Multiply two numbers without using multiplication operator or loops.