From 6b747f6fe7dd08c996962f0ad7159840aec36817 Mon Sep 17 00:00:00 2001 From: joy-rock <91815607+joy-rock@users.noreply.github.com> Date: Tue, 11 Oct 2022 10:48:23 +0530 Subject: [PATCH] Create solution.cpp I added C++ code for Student Attendance Record I. Please merge my PR with hacktoberfest-accepted label. --- .../solution.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Leetcode-Easy/551. Student Attendance Record I/solution.cpp diff --git a/Leetcode-Easy/551. Student Attendance Record I/solution.cpp b/Leetcode-Easy/551. Student Attendance Record I/solution.cpp new file mode 100644 index 0000000..6ddd78c --- /dev/null +++ b/Leetcode-Easy/551. Student Attendance Record I/solution.cpp @@ -0,0 +1,20 @@ +class Solution { +public: + bool checkRecord(string s) { + int ca = 0; + string cl = "LLL"; + int cli = 0; + int find = s.find(cl); + for(int i=0; i