# LeetCode 8. String to Integer (atoi)

Description https://leetcode.com/problems/string-to-integer-atoi/ Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the…

# LeetCode 28. Implement strStr()

Description https://leetcode.com/problems/implement-strstr/ Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of…

# LeetCode 4. Median of Two Sorted Arrays

Description https://leetcode.com/problems/median-of-two-sorted-arrays/ There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of…

# HackerRank – Staircase (Java)

HackerRank – Staircase (Java) Description https://www.hackerrank.com/challenges/staircase Consider a staircase of size n = 4: # ## ### #### Observe that…

# LeetCode 3. Longest Substring Without Repeating Characters

Description https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer…

# LeetCode 7. Reverse Integer

Description https://leetcode.com/problems/reverse-integer/ Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Explanation The…

# LeetCode 1. Two Sum

Description https://leetcode.com/problems/two-sum/ Given an array of integers, return indices of the two numbers such that they add up to a specific target.…

# LeetCode 2. Add Two Numbers

Description https://leetcode.com/problems/add-two-numbers/ You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order…

# LeetCode Solutions and Explanations

Here is a list of LeetCode problems solved by Goodtecher. Goodtecher will keep updating solutions and explains to LeetCode problems.…