Skip to content

Instantly share code, notes, and snippets.

View Jonniie's full-sized avatar
🏋️‍♂️
horning my tools

John Areola Jonniie

🏋️‍♂️
horning my tools
View GitHub Profile
@Jonniie
Jonniie / main.md
Created February 1, 2025 23:10
Leetcode Day 1

Question

Approach

My approach was to loop through the nums arr and check the equality of the parities of adjacent elements, so it checks if elements at i and i+1 are either both even or both odd

Implementation

class Solution {
public:
 bool isArraySpecial(vector& nums) {