Google Intern OA Problems

Правка en3, от Don_quixxote, 2025-07-07 17:28:11
Problem 1.
Given an array find no. of non-empty subsequences which does not have three consecutive odd or three consecutive even numbers in subsequence. Since answer is large print it modulo 1e9+7.
Expected time complexity is O(N) or (ONlogN).

hint
code
Problem 2.
A number X is said to be palindrome special, if every digit i present in X occurs exactly i times and digits of X form a palindrome, you are given t test cases (<=1e5) and in each test case integer N(<=1e17). Find nearest greater no. which is a special palindrome.
hint
code
Теги google, internship, 2025

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Don_quixxote 2025-07-07 17:28:11 289
en2 Английский Don_quixxote 2025-07-07 14:37:41 1983
en1 Английский Don_quixxote 2025-07-07 09:34:07 4230 Initial revision (published)