From 997aeda19f7afda0c90c518a9ee0f63b3813b996 Mon Sep 17 00:00:00 2001 From: SjxSubham Date: Mon, 27 Oct 2025 19:14:26 +0530 Subject: [PATCH] Create 485. Max Consecutive Ones.cpp --- 485. Max Consecutive Ones.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 485. Max Consecutive Ones.cpp diff --git a/485. Max Consecutive Ones.cpp b/485. Max Consecutive Ones.cpp new file mode 100644 index 0000000..9893d5b --- /dev/null +++ b/485. Max Consecutive Ones.cpp @@ -0,0 +1,19 @@ + // Your code goes here + class Solution { +public: + int findMaxConsecutiveOnes(vector& nums) { + int max = 0; + int count = 0; + for(int i=0;i