Posted on    Last Updated On 2022-07-12 by zyrastory
LeetCode Problem You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list. Solution This problem is all about two things, linked list and sort. So, in…
Posted on    Last Updated On 2022-07-12 by zyrastory
LeetCode Problem Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. Solution The first solution is easy. Set the first element of array as temp char. Iterate the left elements, and check each character one by one. C# Solution…
Posted on    Last Updated On 2022-06-18 by zyrastory
LeetCode Problem You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. Solution…
Posted on    Last Updated On 2022-07-12 by zyrastory
LeetCode Problem You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order. The final sorted array should not be returned by the function, but instead be stored inside the array nums1. To accommodate this, nums1 has a length of m + n, where the first m elements…
Posted on    Last Updated On 2022-06-15 by zyrastory
According to BleepingComputer, after being attacked by the ransomware HIVE, the National Bank of Zambia refused to pay the ransom and returned a link of a male genitalia picture, which probably meant to tell hackers to suck my 🍆 The National Bank of Zambia announced that on May 9 2022, the bank experienced an outage…
Posted on    Last Updated On 2022-07-12 by zyrastory
LeetCode Problem Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 – 1], then return 0. Assume the environment does not allow you to store 64-bit integers (signed or unsigned). Solution Because the limit of the problem, we can’t use long number to calculate…
ai_front = {"insertion_before":"BEFORE","insertion_after":"AFTER","insertion_prepend":"PREPEND CONTENT","insertion_append":"APPEND CONTENT","insertion_replace_content":"REPLACE CONTENT","insertion_replace_element":"REPLACE ELEMENT","visible":"VISIBLE","hidden":"HIDDEN","fallback":"FALLBACK","automatically_placed":"Automatically placed by AdSense Auto ads code","cancel":"Cancel","use":"Use","add":"Add","parent":"Parent","cancel_element_selection":"Cancel element selection","select_parent_element":"Select parent element","css_selector":"CSS selector","use_current_selector":"Use current selector","element":"ELEMENT","path":"PATH","selector":"SELECTOR"};