Skip to content
  • Home
  • Algorithms
  • DS
  • Salesforce
  • Courses
    • C Programming
    • Data Structures with C/C++
    • Algorithms and Interview questions
    • ACCOUNTS
      • TALLY ERP9 Course Structure
  • Submit your article
Search
Close

Tag: Recursion

Find all possible combinations of decodings of a number.

GalleryJuly 19, 2020July 19, 2020 KodeBinary

Given an encoding number as explained below, we aim to print all combinations of decoding strings to that input number. The encoding number is as follows. Defining a recursion for this problem is very simple. Let us see the recursion tree for the input number. Let us now write the code for this recursion algorithm.Read More »

Calculating the Sum of Digits Easily with Recursion and Iteration

GalleryJuly 12, 2020January 20, 2023 KodeBinary

To obtain the sum of the digits in an input number, we can use the modulus operator (with 10) to divide each digit and add the results together. Let’s explore this concept with an example. We can solve this problem both iteratively and recursively; let’s take a look at the code for both methods. RecursiveRead More »

Check if given two binary trees are the mirrors to each other

GalleryJune 19, 2020June 20, 2020 KodeBinary

A mirror binary tree is a tree in which the left subtree is on the right side and right subtree on the left side. Let’s see below two binary trees for better understanding. Here in the above images, both trees are mirrors to one another. The recursion formula is simple to this problem. As weRead More »

Minimum cost to reach the end of the array using recursion and dynamic programming

GalleryJune 13, 2020June 20, 2020 KodeBinary

Given an array of different costs(which is positive integers) of size ‘N.’ And a maximum possible jump from the current index to other index is ‘K.’ We aim to find the minimum cost to reach the end of the array. Let’s take below example to understand this problem better. In the above example, starting fromRead More »

Unlocking Maximum Palindromic Length With Powerful Recursion And Dynamic Programming

GalleryJune 9, 2020January 20, 2023 KodeBinary

A substring is a sequence of characters which has been extracted from a larger string. For example, let’s consider the string “Hello World”. We can form the substring “Hello” by selecting the first five characters of the string. Let’s see the following another example. In order to calculate the length of a substring, we needRead More »

Check given string is palindrome or not

GalleryJune 7, 2020June 21, 2020 KodeBinary

A palindrome string is a string that reads similar from back to front. For example strings like “rotator”, “madam”, …etc. Easy way to prove a string is a palindrome or not is to reverse the string and compare it with original series, If both the strings are same then that string is palindrome string. AsRead More »

Different methods to reverse a string

GalleryJune 7, 2020June 21, 2020 KodeBinary

There are multiple ways to reverse a string, whereas here in this article. We are going to discuss a few such methods. First of all, let’s take an example string and see how characters in its reverse series will appear. In the above example, we have taken a string of size seven characters from “0…6”.Read More »

Longest palindromic subsequence length of a string

GalleryJune 7, 2020June 7, 2020 KodeBinary

Given an input string of size ‘N’ characters. We aim to find maximum length subsequence which is palindromic. A subsequence string is a sequence that is formed by another sequence by removing zero or more characters. Whereas a palindrome string is a string that can be read the same from the backward as forward. WeRead More »

Print all subsequences of a given string (Recursive approach)

GalleryJune 6, 2020January 19, 2023 KodeBinary

A subsequence is a subset of characters that can be derived from a given sequence string by removing zero or more characters. To better understand this concept, let’s take the example of the string “Hello” which has a length of 5. As we can see, the string “Hello” has 31 possible subsequences, including “H”, “He”,Read More »

Longest common subsequence length of given two strings

GalleryJune 6, 2020June 6, 2020 KodeBinary

A subsequence is a sequence formed by another sequence after removal of 0 or more items from it. The order that items appear won’t change in the subsequence. In strings, a subsequence string generates by removing 0 or more characters from the parent string. A common subsequence is a subsequence generated from two string. Let’sRead More »

Counting Subsets with Sum in Unsorted Array

GalleryJune 3, 2020January 20, 2023 KodeBinary

We are aiming to find the total number of subsets with a given sum in an array of unsorted integers of size ‘N.’ For example, given an array {1, 2, 3, 4} and a sum of 6, the subsets with sum 6 are {1, 2, 3} and {2, 4}, making the count of subsets 2.Read More »

Find steps to solve the Tower of Hanoi problem

GalleryMay 31, 2020May 31, 2020 KodeBinary

The Tower of Hanoi is one of the oldest mathematical puzzles from ancient times. We have three towers, in one of the towers we have “N” disks. All “N” disks are arranged in such a way that only smaller radius disks can be placed on top larger radius disks, vise-versa not allowed. Here we aimRead More »

House thief problem (using recursion and dynamic programming)

GalleryMay 30, 2020May 30, 2020 KodeBinary

A thief knows all gold reserves of a neighborhood that is in a single row. Thief want’s to have a plan earlier on which houses he wants to steal. To avoid a triggering alarm his condition is to avoid stealing any two houses which are right next to each other. Let’s understand this problem withRead More »

0/1 Knapsack problem example with recursion and dynamic programming solutions

GalleryMay 29, 2020January 19, 2023 KodeBinary

The farmer has a knapsack with a capacity of “N” kgs, and he has products which weigh more than N kgs. He wants to fill the knapsack in such a way that he can maximize the money he can make from selling the products in the knapsack. He cannot cut the products, but he hasRead More »

Coin change problem (Find all number of combinations that formed a sum amount with given denominations)

GalleryMay 27, 2020January 19, 2023 KodeBinary

Our objective is to find the number of different combinations of coin denominations that can be used to make up a given monetary amount. Given a set of coin denominations and the target amount, we aim to determine the various ways in which these coins can be arranged to reach the desired total. To betterRead More »

Posts navigation

Older Posts

Subscribe to KodeBinary

Enter your email address to subscribe KodeBinary and receive notifications of new posts by email.

Join 1,773 other subscribers

Recent Posts

  • Find the sum of the largest increasing branch in an n-ary tree
  • The fizzbuzz program in python
  • Python program to add two numbers
  • Program to find factorial of a number in python
  • Armstrong number in python

Our Partners

Home, Car Loan EMI Calculator

Categories

  • accounts
  • Algorithms
  • autoCAD
  • C
  • C++
  • COVID 19
  • DS
  • HTML
  • Java
  • ms office
  • Python
  • Salesforce
  • TALLY
  • Tally Prime
  • Uncategorized

Tags

Accounts Algorithms Amazon Ancillary Rules Arrays assignment bill of materials Binary Search Tree C++ company contra voucher cost categories cost centers C Programming DataStructures debit Dynamic Programming Graphs GROUPS groups and ledgers gst Interview Questions INVENTORY ledgers Linked List Microsoft payment voucher Purchase Python Queue Quiz receipt voucher Recursion sales Sorting Stack STOCK ITEMS Strings tally tallyerp9 tally prime TALLY WITH GST Trees Voucher vouchers

Follow Us

  • Facebook
  • Tumblr
  • Instagram
  • LinkedIn
  • Twitter
Copyrights 2019 | KodeBinary.com.
Back to top