translink604
BAN USER- 4of 6 votes
AnswerGiven six digits, find the earliest valid time that can be displayed on a digital clock (in 24-hour format) using those digits.
- translink604
For example, given digits 1, 8, 3, 2, 6, 4 the earliest valid time is "12:36:48". Note that "12 : 34 : 68" is not a valid time.
Write a java method:
class Solution {
public String solution(int A, int B, int C, int D, int E, int F);
}
that, given six integers A, B, C, D, E and F, returns the earliest valid time in "HIT :mm: ss" string format, or "NOT POSSIBLE" if it is not possible to display a valid time using all six integers.
For example, given 1, 8, 3, 2, 6, 4 the function should return "12:36:48".
Given 0, 0, 0, 0, 0, 0, the function should return "00 : 00 : oo". Given 0, 0, 0, 7, 8, 9, the function should return "07:08:09".
Given 2, 4, 5, 9, 5, 9, the function should return "NOT POSSIBLE".
Assume that: • A, B, C, D, E and F are integers within the range [0..9].
Correct answer 1 point
Efficient solution 2 points| Report Duplicate | Flag | PURGE
RepCorrinaAyala, Field Sales at Coupondesh
Corrina, works as a Training and development manager. The Training and Development Manager is responsible for improving the productivity of ...
Repjaramsmond, Passenger rate clerk at Sportswest
I am a Passenger Rate Clerk . Charter representative Provides fare information to passengers traveling on non scheduled or chartered motor ...
RepAarnaCleark, AT&T Customer service email at ABC TECH SUPPORT
I am a detail-oriented technical manager with exceptional leadership skills and talent for creative marketing. I am an expert producer ...
RepCandiRoy, HR at ASU
I am a qualified CEO with experience in overseeing the daily activities of small businesses and large corporations alike. I ...
Repseffreyclifford, Area Sales Manager at Achieve Internet
I am a self-motivated office administrator. I am responsible for providing administrative support to office personnel. I have excellent written ...
RepStanPhillips, Animator at AMD
StanPhillips, a Landscape architect . I have been working at Pro Property Maintenance it's almost 10 years . I also help ...
RepManilaRoche, Animator at Abs india pvt. ltd.
Manila , an extensive executive assistant with experience of 4 years in the field of administrative functions, managing the office of ...
RepHenryBrown, Associate at A9
I am an experienced budget analyst skilled at researching and consolidating financial and budget information. I am taught record keeping ...
RepjasOlan, Field Sales at Credit Suisse
hi, I am Isom. I am a Security and fire alarm systems installer. I therefore play an important role in ...
RepKayraKing, abc at A9
I am an expert aircraft maintenance engineer with a high degree of technical knowledge and manual dexterity. In my spare ...
RepIvyWeir, HTML Freshers at Clean Power Research
Ivy , an Empathetic and passionate Psychology student with experience in performing psychological patient assessments, assisting in psychotherapy, monitoring patients' progress ...
RepDavlinaSmith, abc at ADP
I am a current residential landlord with 5 years’ experience looking to expand into commercial property management.Former florist by ...
RepBellaReyes, Android Engineer at ADP
I am a creative and dedicated photo editor with experience in photojournalism and marketing material development. I have a proven ...
Repleroykrtz, Backend Developer at Achieve Internet
I am a Homeowner association manager and am typically involved in drafting and enforcing community rules and regulations. These rules ...
Repmargarettdhigginson11, Android Engineer at ABC TECH SUPPORT
Hello I am a content writer. A content writer is an entry-level job role. It is responsible for writing clear ...
RepSammyTurner, HR Executive freshers at Abs india pvt. ltd.
Sammy , an experienced mortuary service provider performed a variety of tasks involved in holding appropriate and solemn rites during funeral ...
Repneilsjohn4563, Android Engineer at ABC TECH SUPPORT
Hello, I am a multimedia artist. I have 4 years experience in this.A multimedia Artist is someone who is ...
RepCindybilly, Animator at Absolute Softech Ltd
Cindybilly, an Addictions nurse with the experience of 10 years . A substance abuse nurse provides direct patient care to individuals ...
RepJuanitaRiegel, Analyst at ABC TECH SUPPORT
Juanita a dedicated Assistant Event Coordinator adept at managing various corporate events, developing budgets, and recruiting and training new personnel ...
RepSusanBrown, Accountant at AMD
I am a resourceful and seasoned Screen Printing Machine Operator with a strong customer service record across a range of ...
RepDeanSims, Associate at ASU
DeanSims a hardworking Tire builder . expert in this work working at Magna Architectural Design . I am also a part of ...
RepAnnetteFlynn, Android test engineer at ABC TECH SUPPORT
Hello I am a skill trainer. Master's Degree in Industrial and Organisational Psychology and 10 years of experience working ...
RepDiptaHunt, Apple Phone Number available 24/7 for our Customers at A9
I am a dedicated english-mandarin Chinese translator with years of experience working in professional and scientific communities.I have exceptionally ...