问题描述 Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whos…
Day 21.Unique Morse Code Words(804)
问题描述 International Morse Code defines a standard encoding where each letter is mapped to a series of dots and …
Day14.Judge Route Circle(657)
问题描述 Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes …
Day8. Power of Three(326)
问题描述 Given an integer, write a function to determine if it is a power of three. *思路1:* /** * @param {number} n…
Day6. Add Digits(258)
最难忘记的一道, 问题描述 Given a non-negative integer num, repeatedly add all its digits until the result has only one di…
Day13. Reverse String II(541)
问题描述 Given a string and an integer k, you need to reverse the first k characters for every 2k characters count…
Day2. Two Sum(1)
问题描述 Given an array of integers, return indices of the two numbers such that they add up to a specific target.…
Day4. Search Insert Position(35)
问题描述 Given a sorted array and a target value, return the index if the target is found. If not, return the inde…
Day.12 Sum of Square Numbers(633)
问题描述 Given a non-negative integer c, your task is to decide whether there’re two integers a and b such t…
Day 20. Repeated String Match(686)
问题描述 Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substri…
Day16.Student Attendance Record I(551)
问题描述 You are given a string representing an attendance record for a student. The record only contains the foll…
Day9. Move Zeroes(283)
问题描述 Given an array nums, write a function to move all 0’s to the end of it while maintaining the relati…