Paypal 2nd Round of Interview

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;
    }
}
  1. Please feel free to review the first round of the interview.
  2. Third round was to Design Datadog.
  3. Forth round was to explain Factory Design Pattern, write code in such a way that it is scalable. Plus one DSA Question.
Comments (5)