The second round of the interview comprised one question on Data Structures and Algorithms (DSA) and another on System Design Concepts. Below, I am listing the second DSA question.
// Given a binary string, identify and print all unique two-digit binary numbers(Unique, Non Zero)
// that can be formed by scanning the string in a single direction.
// Example 1:
// Input: "001100011"
// Output: "01 11 10"
// Example 2:
// Input: "1111"
// Output: "11"
// Example 3:
// Input: "1100"
// Output: "11 10"
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
String input1 = "001100011";
System.out.println(findUniqueBinaryNumbers(input1));
}
private static Set<String> findUniqueBinaryNumbers(String binaryString) {
// Your implementation here
return uniqueNumbers;
}
}