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 ...