Cisco | Online Assessment | Software Engineer Master's (Intern) United States
Anonymous User
15761

I was given three coding questions.

  1. Write a function that prints a chessboard pattern, with "W" being white
    square and "B" being black. Input is an integer that is the number of squares
    on the board. Output is 2D char array. For example,
    Input = 2
    Output =
    W B
    B W

  2. In the hostel, there are birthday celebrations every month. Given N number of days which are representing the birthday, find the number of days where there are an odd number of birthday celebrations.
    Input:
    The first line of the input consists of an integer days_size representing the number of birthdays celebrations (N).
    The second line of the input consists of N space-separated integers days representing the birthdays' celebrations in a month.
    Output:
    Print an integer representing the number of days where there is an odd number of birthday celebrations.
    Example:
    Input:
    5
    4 8 2 8 9

    Output:
    3

    Explanation: 4, 2 and 9 occur only once (1 is odd). So, the answer is 3.

  3. Leetcode 468: Validate IP Address., but only for IPv4 validity.

Comments (5)