Concatenate the Largest Digit Problem

You are given three non-zero numbers 'A', 'B', and 'C'. Your task is to determine the number created by concatenating the largest digit found in each number, in the sequence of 'A', 'B', and 'C'.

Example:

Input:
A = 5678, B = 45, C = 769
Output:
859
Explanation:

The largest digit in 'A' is '8', in 'B' is '5', and in 'C' is '9'. Concatenating these gives '859'.

Constraints:

  • 1 ≤ T ≤ 104
  • 1 ≤ A, B, C ≤ 106
  • Time limit: 1 Sec
AnswerBot
4mo

Concatenate the largest digit from three numbers in sequence to form a new number.

  • Find the largest digit in each number 'A', 'B', and 'C'.

  • Concatenate the largest digits in the sequence 'A', 'B', and '...read more

Help your peers!
Select
Add answer anonymously...
Associate Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits