Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Note: For the purpose of this problem, we define empty string as valid palindrome.
Given a singly linked list, determine if it is a palindrome.
Could you do it in O(n) time and O(1) space?
Input: 1->2->2->1
Output: true
아시는 분이 작성하신 배우고 시도하는 과정에서 필요한 것들 글을 읽었는데
글이 너무 따듯하고 요즈음 심신이 지친 나에게 괜찮다고 위로를 해주는 듯한 느낌을 받았다.
너무나 마음에 들고 나중에 또 보고 싶은 글이라 작성자분에게 허락을 구하고 글을 퍼왔다.
참고로 원글의 테마와 구성을 하고 올 순 없어서 가능하다면 꼭 원글을 보도록 하자 !
Reverse bits of a given 32 bits unsigned integer.
Input: n = 00000010100101000001111010011100
Output: 964176192 (00111001011110000010100101000000)
Explanation: The input binary string 00000010100101000001111010011100 represents the unsigned integer 43261596, so return 964176192 which its binary representation is 00111001011110000010100101000000.
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Input:
nums1 = [1,2,3,0,0,0], m = 3
nums2 = [2,5,6], n = 3
Output: [1,2,2,3,5,6]
Given head, the head of a linked list, determine if the linked list has a cycle in it.
There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index of the node that tail's next pointer is connected to. Note that pos is not passed as a parameter.
Return true if there is a cycle in the linked list. Otherwise, return false.
Input: head = [3,2,0,-4], pos = 1
Output: true
Explanation: There is a cycle in the linked list, where the tail connects to the 1st node (0-indexed).