📜 ⬆️ ⬇️

Issue # 3: IT training - current issues and challenges from leading companies

This week we complete a selection of tasks and questions that are often given during interviews on Facebook . Tasks have chosen different levels of difficulty from “Easy” to “Hard”. The condition was again left in English. We will attach variants of solutions to the comments in a week Good luck!

Questions:

1. You want to start the animation in half a second after the user presses the button. What is the best way to do this?
')
2. The photo sharing application displays a system notification when a user receives a photo. Your application should display a photo when a user deletes a notification. Which of the following do you need to associate with the Notification object that you submit to the Notification Manager?

Tasks:

one.
It is not nums that it is a rule.
For example, given nums = [0, 1, 0, 3, 12] , after calling your function, nums should be [1, 3, 12, 0, 0] .
Note:
You must do this in-place without copying the array.
Minimize the total number of operations.


2
This is a subarray of sums to k. If there isn't one, return 0 instead.

Note:
The 32-bit signed integer range.

Example 1 :

Given nums = [1, -1, 5, -2, 3], k = 3 ,
return 4 . (because the subarray [1, -1, 5, -2] sums to 3 and is the longest)

Example 2 :

Given nums = [-2, -1, 2, 1], k = 1 ,
return 2. (because the subarray [-1, 2] sums to 1 and is the longest)

Follow Up:
Can you do it in O (n) time?


3
The input string is valid. Return all possible results.

Note : The input string may contain letters other than the parentheses (and).

Examples:
"()())()" -> ["()()()", "(())()"]
"(a)())()" -> ["(a)()()", "(a())()"]
")(" -> [""]

Source: https://habr.com/ru/post/330066/


All Articles