June 4, 2019
Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary representation. (Recall that the number of set bits an integer has is the number of 1s present when written in binary.
June 3, 2019
Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. If the node has two sub-nodes, then this node's value is the smaller value among its two sub-nodes.
June 2, 2019
On an infinite plane, a robot initially stands at (0, 0) and faces north. The robot can receive one of three instructions: "G": go straight 1 unit; "L": turn 90 degrees to the left; "R": turn 90 degress to the right. The robot performs the instructions given in order, and repeats them forever.
May 31, 2019
In a list of songs, the i-th song has a duration of time[i] seconds. Return the number of pairs of songs for which their total duration in seconds is divisible by 60. Formally, we want the number of indices i < j with (time[i] + time[j]) % 60 == 0.
May 29, 2019
A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strings, and + represents string concatenation. For example, "", "()", "(())()", and "(()(()))" are all valid parentheses strings.
May 29, 2019
First, renew letsencrypt ssl certificate. And then copy the new SSL certificate files to zimbra's folder. Follow by replacing the existing commercial key with private key. Finally, deploy and then restart zimbra service.
May 28, 2019
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right. The first integer of each row is greater than the last integer of the previous row.
May 26, 2019
Edit `Global.asax` file. Import the `System.Net` class and then change the security protocol to tls1.2 in the `Applicatin_Start` method.
May 24, 2019
How to set website's default encoding in IIS? How to fix a page that can't display foreign language like Chinese?
Add the tag inside the head tag of the web page. Also add the following setting inside the tag in the web.config file.
May 22, 2019
May 19, 2019
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
May 16, 2019
The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value.
May 13, 2019
A heap is a tree-based data structure which satisfies the heap property, if the parent node is greater than the child node is called max-heap or if the parent node is less than the child node is called min-heap.
January 28, 2019
Certbot ImportError: ‘pyOpenSSL’ module missing required functionality. Try upgrading to v0.14 or newer.
File "/bin/certbot", line 7, in from certbot.main import main File "/usr/lib/python2.7/site-packages/certbot/main.py", line 17, in from certbot import
November 25, 2018
Right click on your start button and select "Command Prompt (Admin)". In the command prompt, type "control appwiz.cpl".