Principal Data Engineer Interview Questions

10,189 principal data engineer interview questions shared by candidates

Problem: You are given a number n. Find the decimal value of the number formed by the concatenation of the binaryrepresentation of the first n positive integers. Print the answer 10^9 + 7. Output format: Print the answer modulo 10^9 + 7 Constraint: 1 <= n <= 10^9 Sample input: 3 Sample Output: 27 The binary representation of 1: 1 The binary representation of 2: 10 The binary representation of 3: 11 Concatenated string: 11011 -> Decimal representation is 27.
avatar

Principal Web Engineer

Interviewed at BlueOptima

3.5
Sep 22, 2020

Problem: You are given a number n. Find the decimal value of the number formed by the concatenation of the binaryrepresentation of the first n positive integers. Print the answer 10^9 + 7. Output format: Print the answer modulo 10^9 + 7 Constraint: 1 <= n <= 10^9 Sample input: 3 Sample Output: 27 The binary representation of 1: 1 The binary representation of 2: 10 The binary representation of 3: 11 Concatenated string: 11011 -> Decimal representation is 27.

Viewing 3371 - 3380 interview questions

Glassdoor has 10,189 interview questions and reports from Principal data engineer interviews. Prepare for your interview. Get hired. Love your job.