Junior Java Software Engineer Interview Questions

3,913 junior java software engineer interview questions shared by candidates

You are given a string with Alphabet set B,D,U and H. This string will be considered steady if each of letter occurs only n/4 times. For Example HBDU and BBHUHDDU both are steady strings. Now your job is to make a string steady if not by replacing substring of input string and replace it with any string of the same length. It can be a empty string also. Return the length of the minimum length substring that can be replaced to make string stable EXAMPLE: Input: HBBBUBBB Output: 5 Explanation: One optimal solution is to replace BBBUB with UUDDH resulting in HUUDDHBB
avatar

Junior Java Developer

Interviewed at Bounteous x Accolite

3.4
Feb 21, 2024

You are given a string with Alphabet set B,D,U and H. This string will be considered steady if each of letter occurs only n/4 times. For Example HBDU and BBHUHDDU both are steady strings. Now your job is to make a string steady if not by replacing substring of input string and replace it with any string of the same length. It can be a empty string also. Return the length of the minimum length substring that can be replaced to make string stable EXAMPLE: Input: HBBBUBBB Output: 5 Explanation: One optimal solution is to replace BBBUB with UUDDH resulting in HUUDDHBB

Viewing 1211 - 1220 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 3,913 interview questions and reports from Junior java software engineer interviews. Prepare for your interview. Get hired. Love your job.