摘要:
题目描述:Reverse a singly linked list.解题思路:使用递归或者迭代的方法。代码如下:方法一:递归/** * Definition for singly-linked list. * public class ListNode { * int val; * ... 阅读全文
摘要:
题目描述:Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For example, the 32-b... 阅读全文