Programming Question: Leetcode-17

  1. For solving the problem recursively, we need helper function , in which digits, result and empty string (current string) will be passed as well as there will be a function which will return corresponding characters for each digit.
  2. for each number in digits , we will get possible characters of that number (for 2 ‘abc’ , for 3 ‘def’ like that).
  3. We will add each possible character into the current string and call the function recursively starting form next digit.
  4. then we cut the current string from end otherwise it will be added in next steps recursively.





Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Introduction and Strategies To Handle Challenges in Caching

a basket of eggs beside a vase of sprouting branches

Wasting Development Cycles to Update Content is Absurd

GSoC’21 Week 1: The Beginning

Using R Programming to make Music


Essential Libraries for Android beginners

Private Docker Registry Part 3: let’s use Azure Storage

Filtering Data with Pandas

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Raj shukla

Raj shukla


More from Medium

[Leet Code] Maximum Number of Words Found in Sentences

My Journey from Electrical Engineer Student to Software Engineer

Interview with Erion Adams, Emerging Tech Developer

Erion Adams

Leap Before You Look, Write More Elegant Code