This commit is contained in:
2025-07-14 19:23:17 +08:00
parent ec59538a98
commit 72843d1812
3 changed files with 72 additions and 0 deletions

12
src/1290.c Normal file
View File

@@ -0,0 +1,12 @@
#include <solution/1290.h>
int getDecimalValue(struct ListNode *head)
{
int x = 0;
while (head)
{
x = (x << 1) + head->val;
head = head->next;
}
return x;
}