Hui WangNov 30, 20221 min readInterview82. Interview: Reverse String (LeetCode Easy)https://leetcode.com/problems/reverse-string/ Solution: Time complexity: O(n) Space complexity: O(1) Two-pointer technique Code: class...
Hui WangNov 29, 20221 min readInterview81. Interview: Single Number (LeetCode Easy)https://leetcode.com/problems/single-number/ Solution: Time complexity: O(n) Space complexity: O(1) It is not hard to find non-duplicate...
Hui WangNov 24, 20221 min readInterview80. Interview: Contains Duplicate (LeetCode Easy)https://leetcode.com/problems/contains-duplicate/ Solution 1: Time complexity : O(nlogn) Space complexity : O(1) After sorting an array,...
Hui WangNov 23, 20221 min readInterview79. Interview: Remove Duplicates from Sorted Array (LeetCode Easy)https://leetcode.com/problems/remove-duplicates-from-sorted-array/ Train of thought: Two-pointer technique We can NOT use any extra...
Hui WangMay 10, 20223 min readInterview29. Difference between the static library and dynamic libraryStatic Library: ipa package file is large. By default, static libraries only link useful class files to Mach-O (with class files as the...