Documentation
¶
Overview ¶
* @lc app=leetcode id=600 lang=golang * * [600] Non-negative Integers without Consecutive Ones * * https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/description/ * * algorithms * Hard (33.50%) * Likes: 309 * Dislikes: 66 * Total Accepted: 10.7K * Total Submissions: 31.9K * Testcase Example: '1' * * Given a positive integer n, find the number of non-negative integers less * than or equal to n, whose binary representations do NOT contain consecutive * ones. * * Example 1: * * Input: 5 * Output: 5 * Explanation: * Here are the non-negative integers * * * Note: * 1 *
Click to show internal directories.
Click to hide internal directories.