diff --git a/README.md b/README.md index 148b030c..8ef2b250 100644 --- a/README.md +++ b/README.md @@ -471,7 +471,7 @@ This repo is a collection of my LeetCode solutions, primarily written in Python, | 2666 | [Allow One Function Call]() | Easy | | [solution]() | js | | 2667 | [Create Hello World Function]() | Easy | | [solution]() | js | | 2671 | [Frequency Tracker]() | Medium | | [solution]() | py | -| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution]() | java, py | +| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution]() | c, java, py | | 2679 | [Sum in a Matrix]() | Medium | | [solution]() | java | | 2703 | [Return Length of Arguments Passed]() | Easy | | [solution]() | js, ts | | 2704 | [To Be Or Not To Be]() | Easy | | [solution]() | js | diff --git a/markdowns/Daily_Questions.md b/markdowns/Daily_Questions.md index 375efbdf..bb82e593 100644 --- a/markdowns/Daily_Questions.md +++ b/markdowns/Daily_Questions.md @@ -6,7 +6,7 @@ Dates are for the date I completed the question so due to the my time zone and h | # | Title | Level | Cats | Solution | Languages | Date Complete | |-----:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|:------------|:----------------------------------------------------------------------------------------------------|:-----------------------------|:----------------| -| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<_2678. Number of Senior Citizens.md>) | java, py | Aug 01, 2024 | +| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<_2678. Number of Senior Citizens.md>) | c, java, py | Aug 01, 2024 | | 1105 | [Filling Bookcase Shelves]() | Medium | Daily | [solution](<_1105. Filling Bookcase Shelves.md>) | py | Jul 31, 2024 | | 1653 | [Minimum Deletions to Make String Balanced]() | Medium | Daily | [solution](<_1653. Minimum Deletions to Make String Balanced.md>) | py | Jul 30, 2024 | | 1395 | [Count Number of Teams]() | Medium | Daily | [solution](<_1395. Count Number of Teams.md>) | py | Jul 29, 2024 | diff --git a/markdowns/Easy.md b/markdowns/Easy.md index 4b6d76a1..4f990fbb 100644 --- a/markdowns/Easy.md +++ b/markdowns/Easy.md @@ -129,7 +129,7 @@ | 2665 | [Counter II]() | Easy | | [solution](<_2665. Counter II.md>) | js | Jul 09, 2024 | | 2666 | [Allow One Function Call]() | Easy | | [solution](<_2666. Allow One Function Call.md>) | js | Jul 09, 2024 | | 2667 | [Create Hello World Function]() | Easy | | [solution](<_2667. Create Hello World Function.md>) | js | Jul 09, 2024 | -| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<_2678. Number of Senior Citizens.md>) | java, py | May 22, 2024 | +| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<_2678. Number of Senior Citizens.md>) | c, java, py | May 22, 2024 | | 2703 | [Return Length of Arguments Passed]() | Easy | | [solution](<_2703. Return Length of Arguments Passed.md>) | js, ts | Jul 09, 2024 | | 2704 | [To Be Or Not To Be]() | Easy | | [solution](<_2704. To Be Or Not To Be.md>) | js | Jul 09, 2024 | | 2723 | [Add Two Promises]() | Easy | | [solution](<_2723. Add Two Promises.md>) | js | Jul 09, 2024 | diff --git a/markdowns/Questions_By_Code_Length.md b/markdowns/Questions_By_Code_Length.md index 6814be71..41a223c7 100644 --- a/markdowns/Questions_By_Code_Length.md +++ b/markdowns/Questions_By_Code_Length.md @@ -226,6 +226,7 @@ Calculations are based on the code files's byte sizes. | 744 | [Find Smallest Letter Greater Than Target]() | Easy | | [solution](<_744. Find Smallest Letter Greater Than Target.md>) | java, py | Jun 01, 2024 | | 77 | [Combinations]() | Medium | | [solution](<_77. Combinations.md>) | py | Jun 07, 2024 | | 125 | [Valid Palindrome]() | Easy | B75, N150 | [solution](<_125. Valid Palindrome.md>) | c, py | Jun 07, 2024 | +| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<_2678. Number of Senior Citizens.md>) | c, java, py | May 22, 2024 | | 1905 | [Count Sub Islands]() | Medium | | [solution](<_1905. Count Sub Islands.md>) | py | Jun 24, 2024 | | 1791 | [Find Center of Star Graph]() | Easy | Daily | [solution](<_1791. Find Center of Star Graph.md>) | c, cpp, java, py | Jun 27, 2024 | | 993 | [Cousins in Binary Tree]() | Easy | | [solution](<_993. Cousins in Binary Tree.md>) | py | Jul 04, 2024 | @@ -293,7 +294,6 @@ Calculations are based on the code files's byte sizes. | 1858 | [Longest Word With All Prefixes]() | Medium | | [solution](<_1858. Longest Word With All Prefixes.md>) | py | Jun 29, 2024 | | 49 | [Group Anagrams]() | Medium | B75, N150 | [solution](<_49. Group Anagrams.md>) | py | Jun 13, 2024 | | 1455 | [Check If a Word Occurs As a Prefix of Any Word in a Sentence]() | Easy | | [solution](<_1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence.md>) | py | Jun 01, 2024 | -| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<_2678. Number of Senior Citizens.md>) | java, py | May 22, 2024 | | 1929 | [Concatenation of Array]() | Easy | | [solution](<_1929. Concatenation of Array.md>) | c, java, py | Jun 03, 2024 | | 1026 | [Maximum Difference Between Node and Ancestor]() | Medium | | [solution](<_1026. Maximum Difference Between Node and Ancestor.md>) | py | Jun 23, 2024 | | 776 | [Split BST]() | Medium | Weekly Premium | [solution](<_776. Split BST.md>) | py | Jun 29, 2024 | diff --git a/markdowns/Questions_By_Recent.md b/markdowns/Questions_By_Recent.md index 8f215da2..1da10489 100644 --- a/markdowns/Questions_By_Recent.md +++ b/markdowns/Questions_By_Recent.md @@ -462,7 +462,7 @@ Calculations are based on the date of the first solve. | 2 | [Add Two Numbers]() | Medium | N150 | [solution](<_2. Add Two Numbers.md>) | java | May 22, 2024 | | 176 | [Second Highest Salary]() | Medium | | [solution](<_176. Second Highest Salary.md>) | sql | May 22, 2024 | | 577 | [Employee Bonus]() | Easy | | [solution](<_577. Employee Bonus.md>) | sql | May 22, 2024 | -| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<_2678. Number of Senior Citizens.md>) | java, py | May 22, 2024 | +| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<_2678. Number of Senior Citizens.md>) | c, java, py | May 22, 2024 | | 26 | [Remove Duplicates from Sorted Array]() | Easy | | [solution](<_26. Remove Duplicates from Sorted Array.md>) | java | May 22, 2024 | | 21 | [Merge Two Sorted Lists]() | Easy | B75, N150 | [solution](<_21. Merge Two Sorted Lists.md>) | java | May 22, 2024 | | 20 | [Valid Parentheses]() | Easy | B75, N150 | [solution](<_20. Valid Parentheses.md>) | java | May 22, 2024 | diff --git a/markdowns/_2678. Number of Senior Citizens.md b/markdowns/_2678. Number of Senior Citizens.md index bf241e3f..5d9cb71c 100644 --- a/markdowns/_2678. Number of Senior Citizens.md +++ b/markdowns/_2678. Number of Senior Citizens.md @@ -20,10 +20,25 @@ ## Solutions +- [e2678 v1.c](<../my-submissions/e2678 v1.c>) - [e2678 v1.py](<../my-submissions/e2678 v1.py>) - [e2678 v2 oneliner.py](<../my-submissions/e2678 v2 oneliner.py>) - [e2678 v3 oneliner.py](<../my-submissions/e2678 v3 oneliner.py>) - [e2678.java](<../my-submissions/e2678.java>) +### C +#### [e2678 v1.c](<../my-submissions/e2678 v1.c>) +```C +int countSeniors(char ** details, int detailsSize){ + int output = 0; + for (int i = 0; i < detailsSize; i++) { + if ((details[i][11] - '0') * 10 + details[i][12] - '0' > 60) { + output++; + } + } + return output; +} +``` + ### Python #### [e2678 v1.py](<../my-submissions/e2678 v1.py>) ```Python diff --git a/markdowns/by_topic/Array.md b/markdowns/by_topic/Array.md index 4ad67be3..492583b4 100644 --- a/markdowns/by_topic/Array.md +++ b/markdowns/by_topic/Array.md @@ -199,7 +199,7 @@ | 2545 | [Sort the Students by Their Kth Score]() | Medium | | [solution](<../_2545. Sort the Students by Their Kth Score.md>) | java, py | Jun 24, 2024 | | 2570 | [Merge Two 2D Arrays by Summing Values]() | Easy | | [solution](<../_2570. Merge Two 2D Arrays by Summing Values.md>) | c | Jun 10, 2024 | | 2610 | [Convert an Array Into a 2D Array With Conditions]() | Medium | | [solution](<../_2610. Convert an Array Into a 2D Array With Conditions.md>) | py | Jun 07, 2024 | -| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<../_2678. Number of Senior Citizens.md>) | java, py | May 22, 2024 | +| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<../_2678. Number of Senior Citizens.md>) | c, java, py | May 22, 2024 | | 2679 | [Sum in a Matrix]() | Medium | | [solution](<../_2679. Sum in a Matrix.md>) | java | May 22, 2024 | | 2751 | [Robot Collisions]() | Hard | Daily | [solution](<../_2751. Robot Collisions.md>) | py | Jul 13, 2024 | | 2942 | [Find Words Containing Character]() | Easy | | [solution](<../_2942. Find Words Containing Character.md>) | c | Jun 06, 2024 | diff --git a/markdowns/by_topic/String.md b/markdowns/by_topic/String.md index ff186c6f..51a23f0c 100644 --- a/markdowns/by_topic/String.md +++ b/markdowns/by_topic/String.md @@ -97,7 +97,7 @@ | 2418 | [Sort the People]() | Easy | Daily | [solution](<../_2418. Sort the People.md>) | py | Jul 22, 2024 | | 2423 | [Remove Letter To Equalize Frequency]() | Easy | | [solution](<../_2423. Remove Letter To Equalize Frequency.md>) | py | Jun 17, 2024 | | 2486 | [Append Characters to String to Make Subsequence]() | Medium | Daily | [solution](<../_2486. Append Characters to String to Make Subsequence.md>) | c, java, py | Jun 03, 2024 | -| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<../_2678. Number of Senior Citizens.md>) | java, py | May 22, 2024 | +| 2678 | [Number of Senior Citizens]() | Easy | Daily | [solution](<../_2678. Number of Senior Citizens.md>) | c, java, py | May 22, 2024 | | 2734 | [Lexicographically Smallest String After Substring Operation]() | Medium | | [solution](<../_2734. Lexicographically Smallest String After Substring Operation.md>) | py | Jun 29, 2024 | | 2743 | [Count Substrings Without Repeating Character]() | Medium | Weekly Premium | [solution](<../_2743. Count Substrings Without Repeating Character.md>) | java, py | Jun 22, 2024 | | 2942 | [Find Words Containing Character]() | Easy | | [solution](<../_2942. Find Words Containing Character.md>) | c | Jun 06, 2024 |