We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83326b5 commit 58f423fCopy full SHA for 58f423f
src/main/java/com/fishercoder/solutions/_1290.java
@@ -13,6 +13,7 @@ public int getDecimalValue(ListNode head) {
13
return Integer.parseInt(sb.toString(), 2);
14
}
15
16
+
17
public static class Solution2 {
18
public int getDecimalValue(ListNode head) {
19
int sum = 0;
src/test/java/com/fishercoder/_1290Test.java
@@ -26,6 +26,7 @@ public void test1() {
26
head = LinkedListUtils.createSinglyLinkedList(Arrays.asList(1, 0, 1));
27
assertEquals(5, solution1.getDecimalValue(head));
28
29
30
@Test
31
public void test2() {
32
head = ListNode.createSinglyLinkedList(Arrays.asList(1, 1, 1));
0 commit comments