There was an error while loading. Please reload this page.
2 parents 1d96fb4 + 4bf4491 commit 945a295Copy full SHA for 945a295
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