1 parent 8426224 commit 1048fa5Copy full SHA for 1048fa5
src/main/java/com/fishercoder/solutions/_400.java
@@ -25,7 +25,12 @@
25
*/
26
public class _400 {
27
28
- //credit: https://discuss.leetcode.com/topic/59314/java-solution
+ /**credit: https://discuss.leetcode.com/topic/59314/java-solution:
29
+ *
30
+ * 1. find the length of the number where the nth digit is from
31
+ * 2. find the actual number where the nth digit is from
32
+ * 3. find the nth digit and return
33
+ * */
34
public int findNthDigit(int n) {
35
int len = 1;
36
long count = 9;
0 commit comments