摘要: There is a room with n lights which are turned on initially and 4 buttons on the wall. After performing exactly m unknown operations towards buttons, 阅读全文
posted @ 2020-03-12 13:43 Schwifty 阅读(134) 评论(0) 推荐(0)
摘要: There is a room with n bulbs, numbered from 1 to n, arranged in a row from left to right. Initially, all the bulbs are turned off. At moment k (for k  阅读全文
posted @ 2020-03-12 13:12 Schwifty 阅读(384) 评论(0) 推荐(0)
摘要: A company has n employees with a unique ID for each employee from 0 to n - 1. The head of the company has is the one with headID. Each employee has on 阅读全文
posted @ 2020-03-12 04:57 Schwifty 阅读(224) 评论(0) 推荐(0)
摘要: Given a binary tree root, a ZigZag path for a binary tree is defined as follow: Choose any node in the binary tree and a direction (right or left). If 阅读全文
posted @ 2020-03-12 01:38 Schwifty 阅读(525) 评论(0) 推荐(0)
摘要: Given an integer n, return a string with n characters such that each character in such string occurs an odd number of times. The returned string must 阅读全文
posted @ 2020-03-12 00:16 Schwifty 阅读(471) 评论(0) 推荐(0)