Skip to content

Instantly share code, notes, and snippets.

View emskaplann's full-sized avatar
👻

Emirhan Kaplan emskaplann

👻
View GitHub Profile
@emskaplann
emskaplann / decodeWaysSolution.js
Last active September 29, 2020 15:43
My own solution for a popular Recursion Problem which is named as Decode Ways.
// This is a popular question asked on interviews. The optimum solution is achieved by using recursion. Because it's kind of building a binary tree with possible moves.
// **DECODE WAYS**
// PROBLEM DESCRIPTION:
// A message containing letters from A-Z is being encoded to numbers using the following mapping:
// 'A' -> 1
// 'B' -> 2
// ...
// 'Z' -> 26
// Given a non-empty string containing only digits, determine the total number of ways to decode it.