There was an error while loading. Please reload this page.
1 parent c098e1b commit 4bf4491Copy full SHA for 4bf4491
1 file changed
leetcode3/이진희/3978. Unique Middle Element.java
@@ -0,0 +1,11 @@
1
+class Solution {
2
+ public boolean isMiddleElementUnique(int[] nums) {
3
+ int target = nums[nums.length/2];
4
+ for(int i=0; i<nums.length; i++) {
5
+ if(i == nums.length/2) continue;
6
+ if(nums[i] == target) return false;
7
+ }
8
+
9
+ return true;
10
11
+}
0 commit comments