Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ Each problem follows this structure:

## Solutions

📊 **Statistics**: 51 problems solved (migrated to new structure)
📊 **Statistics**: 52 problems solved (migrated to new structure)

| Difficulty | Count |
|------------|-------|
| Easy | 35 |
| Easy | 36 |
| Medium | 15 |
| Hard | 1 |

Expand Down
3 changes: 2 additions & 1 deletion docs/EASY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Easy Problems

Total: 35 problems solved
Total: 36 problems solved

## Solutions

Expand Down Expand Up @@ -40,6 +40,7 @@ Total: 35 problems solved
| 2315 | [Count Asterisks](https://leetcode.com/problems/count-asterisks/) | [CountAsterisks2315.java](../src/main/java/com/leetcode/easy/CountAsterisks2315.java) | [CountAsterisks2315Test.java](../src/test/java/com/leetcode/easy/CountAsterisks2315Test.java) |
| 2469 | [Convert the Temperature](https://leetcode.com/problems/convert-the-temperature/) | [ConvertTheTemperature2469.java](../src/main/java/com/leetcode/easy/ConvertTheTemperature2469.java) | [ConvertTheTemperature2469Test.java](../src/test/java/com/leetcode/easy/ConvertTheTemperature2469Test.java) |
| 2798 | [Number of Employees Who Met the Target](https://leetcode.com/problems/number-of-employees-who-met-the-target/) | [NumberOfEmployeesWhoMetTheTarget2798.java](../src/main/java/com/leetcode/easy/NumberOfEmployeesWhoMetTheTarget2798.java) | [NumberOfEmployeesWhoMetTheTarget2798Test.java](../src/test/java/com/leetcode/easy/NumberOfEmployeesWhoMetTheTarget2798Test.java) |
| 2828 | [Check If A String Is An Acronym Of Words](https://leetcode.com/problems/check-if-a-string-is-an-acronym-of-words/) | [CheckIfAStringIsAnAcronymOfWords2828.java](../src/main/java/com/leetcode/easy/CheckIfAStringIsAnAcronymOfWords2828.java) | |
| 3289 | [The Two Sneaky Numbers of Digitville](https://leetcode.com/problems/the-two-sneaky-numbers-of-digitville/) | [TheTwoSneakyNumbersOfDigitville3289.java](../src/main/java/com/leetcode/easy/TheTwoSneakyNumbersOfDigitville3289.java) | [TheTwoSneakyNumbersOfDigitville3289Test.java](../src/test/java/com/leetcode/easy/TheTwoSneakyNumbersOfDigitville3289Test.java) |

---
Expand Down
22 changes: 0 additions & 22 deletions src/CheckIfAStringIsAnAcronymOfWords2828.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Tags: Array, String
package com.leetcode.easy;

import java.util.List;

public class CheckIfAStringIsAnAcronymOfWords2828 {
/**
* Checks if a string is an acronym of the given list of words.
* <p>
* An acronym is formed by taking the first character of each word
* and concatenating them in order.
* <p>
* <b>Time Complexity: O(n)</b>
* <ul>
* <li>n = number of words in the list</li>
* <li>Size comparison check: O(1)</li>
* <li>Single pass through words list: O(n)</li>
* <li>String comparison: O(n)</li>
* </ul>
* <p>
* <b>Space Complexity: O(n)</b>
* <ul>
* <li>StringBuilder stores n characters: O(n)</li>
* </ul>
*
* @param words list of non-empty strings
* @param s the string to check if it's the acronym
* @return {@code true} if s is the acronym of words, {@code false} otherwise
*/
public boolean isAcronym(List<String> words, String s) {
if (words.size() != s.length()) {
return false;
}
StringBuilder sb = new StringBuilder();
for (String word : words) {
sb.append(word.charAt(0));
}
return sb.toString().equals(s);
}
}
Loading