There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle ...
There is a room withnlights which are turned on initially and buttons on the wall. After performing exactlymunknown operations towards buttons, you need to return how many different kinds of status o ...
2017-09-26 10:53 5 4202 推荐指数:
There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle ...
问题描述: 有编号1~100个灯泡,起初所有的灯都是灭的。有100个同学来按灯泡开关,如果灯是亮的,那么按过开关之后,灯会灭掉。如果灯是灭的,按过开关之后灯会亮。现在开始按开关。第1个同学,把所有的灯泡开关都按一次(按开关灯的编号: 1,2,3,......100)。第2个同学,隔一个灯按一次 ...
Given a picture consisting of black and white pixels, and a positive integer N, find the number o ...
Given two integers n and k, you need to construct a list which contains n different positive i ...
Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3] ...
There is a ball in a maze with empty spaces and walls. The ball can go through empty spaces by ro ...
A message containing letters from A-Z is being encoded to numbers using the following mapping way ...
We are given a list of (axis-aligned) `rectangles`. Each `rectangle[i] = [x1, y1, x2, y2] `, where ...