DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Thursday Code Puzzler: Playing With Numbers

Thursday Code Puzzler: Playing With Numbers

James Sugrue user avatar by
James Sugrue
CORE ·
Jun. 14, 12 · Java Zone · Interview
Like (0)
Save
Tweet
5.64K Views

Join the DZone community and get the full member experience.

Join For Free

By now you should be familiar with our Thursday Code Puzzler slot. The idea is simple: solve the coding problem as efficiently as you can, in any language or framework that you think is suitable.

Note: Even though there really is nothing stopping you from finding a solution to this on the internet, try to keep honest, and come up with your own answer.  It's all about the participation!

This weeks question is about deconstructing numbers to find digits that match a certain pattern.

Write a method that would find all positive integers that do not have 0 in their digits, and have a digital sum equal to 5. An example of this would be 14  (1+4 =5). 

Output what each of the numbers are and, as usual, aim for efficiency in your answer

Thanks to everyone who participated in last weeks question, providing some great solutions. 

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Why Is Software Integration Important for Business?
  • Maven Tutorial: Nice and Easy [Video]
  • Use Lambda Function URL To Write a Serverless App Backed by DynamoDB
  • Querying Kafka Topics Using Presto

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo