contributed by < Billy4195 >
2021q1 第 1 週測驗題
[x] Explain how the source code works.
[x] Use Graphviz to visualize the linked-list quiz1 on HackMD
[x] The random() is used in the test program, but there is some pattern for the generated number when we execute it several times. Try to fix it and use some other Pseudorandom number generator
[x] Refer to Optimized QuickSort — C Implementation (Non-Recursive), use non-recursive method to rewrite the quick sort function.
Jim Huang changed 4 years agoView mode Like Bookmark
# Leetcode Q540
:::info
Contributor: [蘇炳立 (BillySu)](https://github.com/Billy4195)
:::
Problem:
Given a sorted array consisting of only integers where every element appears exactly twice except for one element which appears exactly once. Find this single element that appears only once.
### Example 1:
Input: [1,1,2,3,3,4,4,8,8]
Output: 2
### Example 2:
Input: [3,3,7,7,10,11,11]
Output: 10
### Solution 1:
Because the given array is sorted, the simplest way to solve this problem is to scan o
Billy SU changed 6 years agoView mode Like Bookmark