Reverse a string using a stack data structure
This post will discuss how to reverse a string using the stack data structure in C/C++, Java, and Python using explicit stack and call stack.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedThis post will discuss how to reverse a string using the stack data structure in C/C++, Java, and Python using explicit stack and call stack.
In this post, we will see how to find all lexicographic permutations of a string where the repetition of characters is allowed.
Find all n–digit binary numbers with an equal sum of left and right half, where n varies from 1 to 9 and the binary number should not start with 0.
Given a string, find minimum cuts needed to partition it such that each partition is a palindrome.
In this post, we will see how to list out all permutations of a string in Python.
Given a positive integer n, find all n–digit binary numbers having more 1’s than 0’s for any prefix of the number.
Given three strings, return true if the third string is interleaving the first and second strings, i.e., it is formed from all characters of the first and second string, and the order of characters is preserved.
Find all n–digit numbers with an equal sum where n varies from 1 to 9 and sum <= 81 (Maximum possible sum in a 9–digit number).
Implement your diff utility, i.e., given two similar strings, efficiently list out all differences between them. The diff utility is a data comparison tool that calculates and displays the differences between the two texts.
Given a string, calculate its rank among all its lexicographically sorted permutations.
Given a string and a pattern (having all distinct characters), determine if the string characters follow a specific order as defined by the pattern’s characters.
Given a string, remove adjacent duplicates characters from it. In other words, remove all consecutive same characters except one.