question_slug
stringlengths
3
77
title
stringlengths
1
183
slug
stringlengths
12
45
summary
stringlengths
1
160
⌀
author
stringlengths
2
30
certification
stringclasses
2 values
created_at
stringdate
2013-10-25 17:32:12
2025-04-12 09:38:24
updated_at
stringdate
2013-10-25 17:32:12
2025-04-12 09:38:24
hit_count
int64
0
10.6M
has_video
bool
2 classes
content
stringlengths
4
576k
upvotes
int64
0
11.5k
downvotes
int64
0
358
tags
stringlengths
2
193
comments
int64
0
2.56k
number-of-restricted-paths-from-first-to-last-node
C++ Graph :Dijikstra + DP Based Well Commented Solution
c-graph-dijikstra-dp-based-well-commente-ncjv
IntuitionStep1: find dist of all nodes from n Step2 : Using DP find all paths such that : distanceToLastNode(zi) > distanceToLastNode(zi+1).....Complexity Time
SJ4u
NORMAL
2025-04-04T20:01:40.912693+00:00
2025-04-04T20:01:40.912693+00:00
3
false
# Intuition Step1: find dist of all nodes from n Step2 : Using DP find all paths such that : distanceToLastNode(zi) > distanceToLastNode(zi+1)..... # Complexity - Time complexity: $$O(n)$$ <!-- Add your time complexity here, e.g. $$O(n)$$ --> - Space complexity: $$O(n)$$ <!-- Add your space complexity here, e.g...
0
0
['C++']
0
number-of-restricted-paths-from-first-to-last-node
Dijkstra's | DP | DFS
dijkstras-dp-dfs-by-_navjot_singh_1-5jn6
Code
_navjot_singh_1
NORMAL
2025-03-27T12:35:35.314175+00:00
2025-03-27T12:35:35.314175+00:00
6
false
# Code ```cpp [] class Solution { public: const int mod = 1e9 + 7; vector<int> smallest(vector<vector<pair<int,int>>> &adj, int n, int src){ // distance node priority_queue<pair<int,int>, vector<pair<int,int>>, greater<pair<int,int>> > pq; vector<int> dist(n+1,INT_MAX); dist...
0
0
['C++']
0
number-of-restricted-paths-from-first-to-last-node
Python3 - Dijkstra + Memoization
python3-dijkstra-memoization-by-npthao-wvl8
Code
npthao
NORMAL
2025-03-10T18:42:23.219090+00:00
2025-03-10T18:42:23.219090+00:00
9
false
# Code ```python3 [] class Solution: def countRestrictedPaths(self, n: int, edges: List[List[int]]) -> int: graph = defaultdict(list) for u,v,w in edges: graph[u].append((v,w)) graph[v].append((u,w)) def dijkstra(start, graph): dist = {i : float('inf') fo...
0
0
['Python3']
0
number-of-restricted-paths-from-first-to-last-node
Python3 - Dijkstra + DP
python3-dijkstra-dp-by-npthao-2dt8
Code
npthao
NORMAL
2025-03-10T18:40:42.902777+00:00
2025-03-10T18:40:55.043377+00:00
6
false
# Code ```python3 [] class Solution: def countRestrictedPaths(self, n: int, edges: List[List[int]]) -> int: graph = defaultdict(list) for u,v,w in edges: graph[u].append((v,w)) graph[v].append((u,w)) dist = [float('inf')]*(n+1) #Dijkstra array to store shortest path ...
0
0
['Python3']
0
number-of-restricted-paths-from-first-to-last-node
✅Dijkstra's Algorithm + Linear DP
dijkstras-algorithm-linear-dp-by-akash_s-0oda
IntuitionThe problem ask's to find all restricted paths such that every node in the path follows condition i.e distanceToLastNode(currNode) > distanceToLastNode
Akash_Sonar
NORMAL
2025-02-28T11:48:13.102666+00:00
2025-02-28T11:48:13.102666+00:00
7
false
# Intuition The problem ask's to find all restricted paths such that every node in the path follows condition i.e `distanceToLastNode(currNode) > distanceToLastNode(nextNode)` The very frist thing we need is the min dist from every node to n. If we apply Dijkstra's Algorithm for shorest path from every node to n, it ...
0
0
['Dynamic Programming', 'Shortest Path', 'Java']
0
number-of-restricted-paths-from-first-to-last-node
Go - Djikstra + Dynamic Programming
go-djikstra-dynamic-programming-by-aaron-7q8s
Code
aaron_mathis
NORMAL
2025-02-26T17:37:35.893946+00:00
2025-02-26T17:37:35.893946+00:00
9
false
# Code ```golang [] package main import ( "container/heap" "fmt" "math" "sort" ) const MOD = 1_000_000_007 // PriorityQueue implements a min-heap type PriorityQueue []Node type Node struct { dist int id int } func (pq PriorityQueue) Len() int { return len(pq) } func (pq PriorityQueue) Less(i, j ...
0
0
['Dynamic Programming', 'Graph', 'Topological Sort', 'Heap (Priority Queue)', 'Shortest Path', 'Go']
0
number-of-restricted-paths-from-first-to-last-node
Python3 - Beats 100%- Dijkstra's algorithm + Dynamic Programming (BFS, heap, memoization)
python3-beats-100-dijkstras-algorithm-dy-rtpv
IntuitionThis problem will require finding the shortest path from the end node to all other nodes. To do this, we will use Dijkstra's algorithm (BFS + Priority
aaron_mathis
NORMAL
2025-02-26T17:27:20.532634+00:00
2025-02-26T17:27:20.532634+00:00
8
false
# Intuition This problem will require finding the shortest path from the end node to all other nodes. To do this, we will use Dijkstra's algorithm (BFS + Priority Queue). At that point, we can simply use dynamic programming to figure out the number of paths from 1 - n that meet the restricted condition. To be extreme...
0
0
['Dynamic Programming', 'Graph', 'Heap (Priority Queue)', 'Shortest Path', 'Python3']
0
number-of-restricted-paths-from-first-to-last-node
Very Easy Check Once
very-easy-check-once-by-aniketb11-bsy4
IntuitionThe problem requires counting paths from node1to noden, with the restriction that each step must move to a node with a strictly smaller shortest distan
aniketb11
NORMAL
2025-02-19T18:37:39.439028+00:00
2025-02-19T18:37:39.439028+00:00
7
false
## **Intuition** The problem requires counting paths from node **1** to node **n**, with the restriction that each step must move to a node with a strictly smaller shortest distance to node **n**. 1. First, compute the shortest path from **n** to all other nodes using **Dijkstra’s Algorithm**. 2. Then, use **DFS with...
0
0
['Dynamic Programming', 'Graph', 'Topological Sort', 'Heap (Priority Queue)', 'Shortest Path', 'Java']
0
number-of-restricted-paths-from-first-to-last-node
C++ solution
c-solution-by-36zpt9pafz-8f1k
Code
36ZPt9PAFz
NORMAL
2025-02-02T15:10:29.874975+00:00
2025-02-02T15:10:29.874975+00:00
5
false
# Code ```cpp [] class Solution { public: int countRestrictedPaths(int n, vector<vector<int>>& edges) { const unsigned int M = 1000000007; vector<vector<pair<int, int>>> adj(n + 1); // create adjacent matrix for (vector<int>& e : edges) { adj[e[0]].push_back({e[1], e[2]}...
0
0
['Heap (Priority Queue)', 'Shortest Path', 'C++']
0
number-of-restricted-paths-from-first-to-last-node
Easy C++ solution Dijkstra's algorithm and DFS
easy-c-solution-dijkstras-algorithm-and-zs5wj
Please upvote if you have got any help from my code. Thank you.
imran2018wahid
NORMAL
2025-02-01T19:09:00.515221+00:00
2025-02-01T19:09:00.515221+00:00
9
false
``` typedef pair<int, int> p; class Solution { public: int mod = 1e9+7; int dfs(vector<vector<int>> adj[], vector<int>&dis, int curr, int n, vector<int>&dp) { if (curr == n) { return dp[curr] = 1; } if (dp[curr] != -1) { return dp[curr]; } int coun...
0
0
['C++']
0
number-of-restricted-paths-from-first-to-last-node
1786. Number of Restricted Paths From First to Last Node
1786-number-of-restricted-paths-from-fir-9e1v
IntuitionApproachComplexity Time complexity: Space complexity: Code
G8xd0QPqTy
NORMAL
2025-01-15T03:27:01.592280+00:00
2025-01-15T03:27:01.592280+00:00
9
false
# Intuition <!-- Describe your first thoughts on how to solve this problem. --> # Approach <!-- Describe your approach to solving the problem. --> # Complexity - Time complexity: <!-- Add your time complexity here, e.g. $$O(n)$$ --> - Space complexity: <!-- Add your space complexity here, e.g. $$O(n)$$ --> # Code `...
0
0
['Python3']
0
number-of-restricted-paths-from-first-to-last-node
Djikstras && DFS till test case 43/77 then Djikstras dfs +DP to pass all
djikstras-dfs-till-test-case-4377-then-d-stmk
Intuitionusing Dijkstras && DFS we only reach till testcase 42/77 or sowe need dp after that 1 submistion is without dp fail for test case n=422 2 submition is
yui_ishigami
NORMAL
2025-01-07T14:26:40.318238+00:00
2025-01-07T14:26:40.318238+00:00
8
false
# Intuition using Dijkstras && DFS we only reach till testcase 42/77 or so we need dp after that 1 submistion is without dp fail for test case n=422 2 submition is dp pass all the test case # Code ```java [] // 1 solution submition is tle for 422 class store { int dist; int node; public store(int di...
0
0
['Depth-First Search', 'Graph', 'Java']
0
number-of-restricted-paths-from-first-to-last-node
PriorityQueue
priorityqueue-by-linda2024-7lxn
IntuitionApproachComplexity Time complexity: Space complexity: Code
linda2024
NORMAL
2024-12-18T21:18:52.659106+00:00
2024-12-18T21:18:52.659106+00:00
5
false
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ --...
0
0
['C#']
0
number-of-restricted-paths-from-first-to-last-node
Modified Dijkstra's, No extra DP / BFS / DFS
modified-dijkstras-no-extra-dp-bfs-dfs-b-7xdd
\n\n# Code\ncpp []\n#define ll long long \nclass Solution {\npublic:\n int countRestrictedPaths(int n, vector<vector<int>>& edges) {\n ll M = 1e9 + 7;
amazing_ankit
NORMAL
2024-12-07T14:48:22.979487+00:00
2024-12-07T14:48:22.979524+00:00
11
false
\n\n# Code\n```cpp []\n#define ll long long \nclass Solution {\npublic:\n int countRestrictedPaths(int n, vector<vector<int>>& edges) {\n ll M = 1e9 + 7;\n vector<vector<pair<ll,ll>>> adjMat(n+1, vector<pair<ll,ll>>());\n for(auto edge: edges){\n adjMat[edge[0]].push_back({edge[1], ed...
0
0
['C++']
0
number-of-restricted-paths-from-first-to-last-node
Dijkstra | DP | Memoized DFS | Optimal | C++
dijkstra-dp-memoized-dfs-optimal-c-by-ad-eny2
Time Complexity: O((E + V) log V)\nSpace Complexity: O(E + V)\n\ntypedef pair<int, int> pii;\nconst int MOD = 1e9 + 7;\nclass Solution {\n vector<int> dijkst
adityabhongade
NORMAL
2024-11-28T16:57:41.557308+00:00
2024-11-28T16:57:41.557349+00:00
1
false
**Time Complexity**: O((E + V) log V)\n**Space Complexity**: O(E + V)\n```\ntypedef pair<int, int> pii;\nconst int MOD = 1e9 + 7;\nclass Solution {\n vector<int> dijkstra(const vector<vector<pii>>& adj, int src) {\n vector<int> dist(src + 1, INT_MAX);\n \xA0 \xA0 \xA0 \xA0dist[src] = 0;\n priority_queu...
0
0
[]
0
number-of-restricted-paths-from-first-to-last-node
Dijkstra + DFS + DP
dijkstra-dfs-dp-by-up41guy-ifbs
javascript []\nclass MinMaxPriorityQueue {\n\n #heap = []\n #compare;\n\n constructor(compare) {\n this.#heap = [];\n this.#compare = compare || ((a, b
Cx1z0
NORMAL
2024-11-26T09:16:54.064760+00:00
2024-11-26T09:16:54.064797+00:00
4
false
```javascript []\nclass MinMaxPriorityQueue {\n\n #heap = []\n #compare;\n\n constructor(compare) {\n this.#heap = [];\n this.#compare = compare || ((a, b) => a - b) //By default, keep it MinHeap\n }\n\n // Add a new element to the priority queue\n enqueue = (value) => {\n this.#heap.push(value);\n th...
0
0
['Dynamic Programming', 'Graph', 'Topological Sort', 'Heap (Priority Queue)', 'Shortest Path', 'JavaScript']
0
check-if-the-sentence-is-pangram
Simple solution, no set/map
simple-solution-no-setmap-by-korney_a-xmog
```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n int seen = 0;\n for(char c : sentence.toCharArray()) {\n
korney_a
NORMAL
2021-04-18T04:12:35.290570+00:00
2021-04-18T04:12:35.290598+00:00
16,396
false
```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n int seen = 0;\n for(char c : sentence.toCharArray()) {\n int ci = c - \'a\';\n seen = seen | (1 << ci);\n }\n return seen == ((1 << 26) - 1);\n }\n}
264
7
[]
33
check-if-the-sentence-is-pangram
[Java/C++/Python] Set Solution
javacpython-set-solution-by-lee215-0gwg
\n# Explanation\nPut all characters in a set,\nreturn if the size of set equals to 26.\nCan return earlier if you like.\n\n\n# Complexity\nTime O(n)\nSpace O(26
lee215
NORMAL
2021-04-18T04:02:35.829059+00:00
2021-04-18T04:54:31.846558+00:00
15,493
false
\n# **Explanation**\nPut all characters in a set,\nreturn if the size of set equals to 26.\nCan return earlier if you like.\n<br>\n\n# **Complexity**\nTime `O(n)`\nSpace `O(26)`\n<br>\n\n**Java**\n```java\n public boolean checkIfPangram(String sentence) {\n Set<Character> s = new HashSet<>();\n for (in...
150
4
[]
29
check-if-the-sentence-is-pangram
Java Simple and easy to understand solution, 1 ms, faster than 100.00%, clean code with comments
java-simple-and-easy-to-understand-solut-u5sb
PLEASE UPVOTE IF YOU LIKE THIS SOLUTION\n\n\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n boolean[] letters = new boolean[
satyaDcoder
NORMAL
2021-04-18T04:43:17.698684+00:00
2021-04-18T04:43:17.698720+00:00
7,344
false
**PLEASE UPVOTE IF YOU LIKE THIS SOLUTION**\n\n\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n boolean[] letters = new boolean[26];\n \n for(char c : sentence.toCharArray()) {\n letters[c - \'a\'] = true;\n }\n \n //find any letter th...
75
3
['Java']
5
check-if-the-sentence-is-pangram
Simple java 0ms
simple-java-0ms-by-guptayash3-v3x6
\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n\t\tif (sentence.length() < 26) {\n\t\t\treturn false;\n\t\t}\n\t\tString alphas = "ab
guptayash3
NORMAL
2021-05-10T18:44:48.487855+00:00
2021-05-10T18:44:48.487898+00:00
4,351
false
```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n\t\tif (sentence.length() < 26) {\n\t\t\treturn false;\n\t\t}\n\t\tString alphas = "abcdefghijklmnopqrstuvwxyz";\n\t\tfor (int i = 0; i < alphas.length(); i++) {\n\t\t\tif (sentence.indexOf(alphas.charAt(i)) == -1) {\n\t\t\t\treturn false;\n\t...
54
2
['Java']
5
check-if-the-sentence-is-pangram
C++ || 0ms || Short & Simple Code || ✅⭐⭐
c-0ms-short-simple-code-by-palashhh-tt65
DO UPVOTE IF IT HELPS !!!!\n\n--------------------------------------------------------\n\nIntuition 1 - Using a frequency vector store to store count and then t
palashhh
NORMAL
2022-10-17T03:43:00.458892+00:00
2022-10-17T06:42:16.673155+00:00
5,286
false
***DO UPVOTE IF IT HELPS !!!!***\n\n--------------------------------------------------------\n\n**Intuition 1 -** Using a frequency vector store to store count and then traversing it to check for any 0 occurence.\n\n\tbool checkIfPangram(string sentence) {\n \n vector<int> freq(26); /...
49
0
['C']
5
check-if-the-sentence-is-pangram
[ALL Languages] ONLY 1 Line !
all-languages-only-1-line-by-ethanrao-24nc
\n# Code\ncpp []\nclass Solution {\npublic:\n bool checkIfPangram(string sentence) {\n return unordered_set<char>(sentence.begin(), sentence.end()).si
ethanrao
NORMAL
2022-10-17T00:45:50.966237+00:00
2022-10-17T00:51:03.368397+00:00
6,317
false
\n# Code\n```cpp []\nclass Solution {\npublic:\n bool checkIfPangram(string sentence) {\n return unordered_set<char>(sentence.begin(), sentence.end()).size() == 26;\n }\n};\n```\n\n```java []\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n return sentence.chars().distinct()...
42
0
['Python', 'C++', 'Python3', 'Kotlin', 'JavaScript']
3
check-if-the-sentence-is-pangram
C++ || 7 different approaches || clean code
c-7-different-approaches-clean-code-by-h-4mun
\nTitle: C++ || 7 different approaches || clean code\nProblem: 1832\nURL: https://leetcode.com/problems/check-if-the-sentence-is-pangram/discuss/2713135/c-7-dif
heder
NORMAL
2022-10-17T07:28:32.896112+00:00
2022-10-17T19:04:54.110687+00:00
2,630
false
<!--\nTitle: C++ || 7 different approaches || clean code\nProblem: 1832\nURL: https://leetcode.com/problems/check-if-the-sentence-is-pangram/discuss/2713135/c-7-different-approaches-clean-code\n-->\n\nI had way too much fun coming up with different approach to solve this problem. Please let me know if you have any sugg...
39
0
['C', 'C++']
1
check-if-the-sentence-is-pangram
C++ SIMPLE QUESTION NEEDS SIMPLE SOLUTION -> O(N*26)=O(N)
c-simple-question-needs-simple-solution-ah6mg
PLZ UPVOTE IF YOU LIKED IT\n\n```\nclass Solution {\npublic:\n bool checkIfPangram(string sentence) {\n vector n(26,0);\n \n for(char c:
sm3210
NORMAL
2021-04-21T19:58:59.354806+00:00
2021-04-21T19:58:59.354850+00:00
3,367
false
**PLZ UPVOTE IF YOU LIKED IT**\n\n```\nclass Solution {\npublic:\n bool checkIfPangram(string sentence) {\n vector<int> n(26,0);\n \n for(char c:sentence)n[c-\'a\']++;\n \n for(int i=0;i<26;i++)\n if(n[i]==0)return false;\n \n return true;\n }\n};
31
3
['C', 'C++']
4
check-if-the-sentence-is-pangram
simplest solution you have never seen if you are a beginner[beats 100% of solution check it out
simplest-solution-you-have-never-seen-if-nbd2
IntuitionApproachComplexity Time complexity:o(n) Space complexity:O(1) Code
palleabhinay
NORMAL
2025-01-09T17:58:59.343081+00:00
2025-01-09T17:58:59.343081+00:00
1,878
false
# Intuition <!-- Describe your first thoughts on how to solve this problem. --> # Approach <!-- Describe your approach to solving the problem. --> # Complexity - Time complexity:o(n) <!-- Add your time complexity here, e.g. $$O(n)$$ --> - Space complexity:O(1) <!-- Add your space complexity here, e.g. $$O(n)$$ --> ...
26
0
['Hash Table', 'String', 'Java']
4
check-if-the-sentence-is-pangram
Multiple solution in python
multiple-solution-in-python-by-shubham_1-1dyt
Fastest Solution:\n\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n lst=[0]*26\n for i in sentence:\n lst[ord(
shubham_1307
NORMAL
2022-10-17T02:30:32.274715+00:00
2022-10-17T02:34:23.598353+00:00
2,647
false
**Fastest Solution:**\n```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n lst=[0]*26\n for i in sentence:\n lst[ord(i)-ord(\'a\')]+=1\n return 0 not in lst\n```\n\n**One line solution:**\n```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:...
25
0
['Array', 'Python', 'Python3']
2
check-if-the-sentence-is-pangram
Simple | Easy | O(1) java Solution
simple-easy-o1-java-solution-by-akhilsha-h1nm
if you like this \nplease upvote and like this\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n if(sentence.length()<26) retu
AkhilSharma24
NORMAL
2021-07-22T16:07:58.525237+00:00
2021-07-22T16:07:58.525284+00:00
2,072
false
if you like this \n***please upvote and like this***\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n if(sentence.length()<26) return false;\n for(int i=1;i<=26;i++)\n if(sentence.indexOf((char)i+96)<0)\n return false; \n return true;\...
24
3
['Java']
5
check-if-the-sentence-is-pangram
one liner
one-liner-by-droj-w6xw
\nclass Solution:\n def checkIfPangram(self, se: str) -> bool:\n return(len(set(se))==26) \n
droj
NORMAL
2022-10-17T04:19:51.731357+00:00
2022-10-17T04:19:51.731387+00:00
1,314
false
```\nclass Solution:\n def checkIfPangram(self, se: str) -> bool:\n return(len(set(se))==26) \n```
22
1
['Ordered Set', 'Python']
4
check-if-the-sentence-is-pangram
[Python] One-liner | Easy Understandable Sol | Sets
python-one-liner-easy-understandable-sol-hjck
\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n return len(set(sentence)) == 26\n\n
ayushi7rawat
NORMAL
2021-04-18T04:10:52.014577+00:00
2021-04-18T04:10:52.014619+00:00
1,692
false
```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n return len(set(sentence)) == 26\n```\n
22
1
['Python']
6
check-if-the-sentence-is-pangram
Easy 3 approaches with explanation | C++ | 100% time | One liner
easy-3-approaches-with-explanation-c-100-h955
Very Easy solutions with quick explanation \nApproach 1 Basic approach of counting frequency\nI have used array for this approach\n100% time for this approach\n
kaustubhvats28
NORMAL
2021-08-03T13:28:58.603606+00:00
2021-12-27T11:14:09.160585+00:00
2,010
false
Very Easy solutions with quick explanation \n**Approach 1 Basic approach of counting frequency**\nI have used array for this approach\n100% time for this approach\n```\nclass Solution {\npublic:\n bool checkIfPangram(string sentence) {\n vector<int> v(26,0);\n for(auto x:sentence)\n {\n ...
21
0
['Array', 'Hash Table', 'C', 'Ordered Set', 'C++']
4
check-if-the-sentence-is-pangram
JAVA || EASY SOLUTION
java-easy-solution-by-ashutosh_pandey-piyz
IF YOU LIKE THE SOLUTION\nMAKE SURE TO UPVOTE IT !\n\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n // Created count array t
ashutosh_pandey
NORMAL
2022-10-17T02:45:49.104498+00:00
2022-10-17T02:45:49.104536+00:00
2,590
false
IF YOU LIKE THE SOLUTION\nMAKE SURE TO UPVOTE IT !\n\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n // Created count array to take count of every character.\n int[] count = new int[26];\n \n // Fill our count array\n for(int i = 0; i<sentence.length(); i...
20
0
['Java']
4
check-if-the-sentence-is-pangram
Simple Solution Without Using Extra Space
simple-solution-without-using-extra-spac-huv4
UPvote If you got it\n\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n \n if(sentence.length()<26 || sentence == null)
hp902
NORMAL
2021-06-22T15:23:44.954362+00:00
2021-06-22T15:23:44.954414+00:00
976
false
**UPvote If you got it**\n\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n \n if(sentence.length()<26 || sentence == null)\n return false;\n \n for(char i=97;i<=122;i++){\n if(!sentence.contains(String.valueOf(i)))\n return ...
20
3
['Java']
1
check-if-the-sentence-is-pangram
Javascript one-liner 100% O(n)
javascript-one-liner-100-on-by-pixel_pro-poe5
\nvar checkIfPangram = function(sentence) {\n return new Set(sentence.split("")).size == 26;\n};\n
pixel_pro_max
NORMAL
2021-04-18T08:12:10.872654+00:00
2021-04-18T08:12:10.872684+00:00
1,741
false
```\nvar checkIfPangram = function(sentence) {\n return new Set(sentence.split("")).size == 26;\n};\n```
18
1
['JavaScript']
4
check-if-the-sentence-is-pangram
only 1 line code for python3
only-1-line-code-for-python3-by-hakkiot-ucw1
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time
hakkiot
NORMAL
2023-06-12T10:43:17.118343+00:00
2023-06-12T10:43:17.118391+00:00
1,104
false
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ --...
17
0
['String', 'Python3']
1
check-if-the-sentence-is-pangram
javascript one-liner
javascript-one-liner-by-ramakrishna0505-e2bx
var checkIfPangram = function(sentence) {\n return new Set([...sentence]).size === 26;\n};
ramakrishna0505
NORMAL
2021-04-18T11:47:48.325772+00:00
2021-04-18T11:47:48.325828+00:00
747
false
var checkIfPangram = function(sentence) {\n return new Set([...sentence]).size === 26;\n};
15
0
[]
3
check-if-the-sentence-is-pangram
C++/Java Count Array
cjava-count-array-by-votrubac-cv54
C++\ncpp\nbool checkIfPangram(string sentence) {\n int cnt[26] = {}, total = 0;\n for (auto ch: sentence)\n if (++cnt[ch - \'a\'] == 1)\n
votrubac
NORMAL
2021-04-18T04:03:52.867684+00:00
2021-04-18T04:03:52.867711+00:00
1,724
false
**C++**\n```cpp\nbool checkIfPangram(string sentence) {\n int cnt[26] = {}, total = 0;\n for (auto ch: sentence)\n if (++cnt[ch - \'a\'] == 1)\n total++;\n return total == 26;\n}\n```\n**Java**\n```java\npublic boolean checkIfPangram(String sentence) {\n int cnt[] = new int[26], total = 0;...
15
1
[]
4
check-if-the-sentence-is-pangram
Java || using Frequency array || using Set || using HashMap
java-using-frequency-array-using-set-usi-xslg
1. using Frequency Array\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n int [] freq=new int[26];\n for(int i=0;i<sent
kadamyogesh7218
NORMAL
2022-10-17T05:01:47.438947+00:00
2022-10-17T05:01:47.439002+00:00
1,273
false
**1. using Frequency Array**\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n int [] freq=new int[26];\n for(int i=0;i<sentence.length();i++){\n freq[sentence.charAt(i)-\'a\']++;\n }\n for(int i=0;i<26;i++){\n if(freq[i]==0){\n ...
14
0
['Ordered Set', 'Java']
0
check-if-the-sentence-is-pangram
Python 2 different approaches | beats 96% time, O(1) solution!
python-2-different-approaches-beats-96-t-wzgl
\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n \n # naive approach - 1\n # freq = {}\n # for i in sentenc
vanigupta20024
NORMAL
2021-06-16T18:44:37.017186+00:00
2021-06-16T18:44:37.017214+00:00
1,083
false
```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n \n # naive approach - 1\n # freq = {}\n # for i in sentence:\n # freq[i] = freq.get(i, 0) + 1\n # if len(freq) == 26: return True\n # return False\n \n # optimized approach - 2...
12
0
['Python', 'Python3']
2
check-if-the-sentence-is-pangram
JAVA Solution || Beats 100% || Easy Approach
java-solution-beats-100-easy-approach-by-nzp7
Intuition\n1. Length Check: It first checks if the sentence length is less than 26. If so, it cannot be a pangram as it wouldn\'t have enough characters to incl
saloningole
NORMAL
2024-08-27T17:38:08.988994+00:00
2024-08-27T17:38:08.989023+00:00
1,536
false
# Intuition\n1. Length Check: It first checks if the sentence length is less than 26. If so, it cannot be a pangram as it wouldn\'t have enough characters to include all letters.\nLetter Iteration: It then iterates through all lowercase letters from \'a\' to \'z\'.\n2. Letter Search: For each letter, it checks if it ex...
11
0
['Java']
4
check-if-the-sentence-is-pangram
Easy Java Solution using HashSet Two Approaches
easy-java-solution-using-hashset-two-app-b4j6
Approach 1\n1. Initialize HashSet:\n - Create a HashSet<Character> mp to store unique characters from the sentence.\n\n2. Add Characters to HashSet:\n - Ite
RajarshiMitra
NORMAL
2024-05-26T09:00:13.718534+00:00
2024-06-21T06:20:09.315254+00:00
1,059
false
# Approach 1\n1. **Initialize HashSet**:\n - Create a `HashSet<Character> mp` to store unique characters from the sentence.\n\n2. **Add Characters to HashSet**:\n - Iterate through each character in the `sentence`.\n - Add each character to the `HashSet`.\n\n3. **Check for Pangram**:\n - Iterate through all low...
11
0
['Java']
1
check-if-the-sentence-is-pangram
One liner, faster than 97% solution
one-liner-faster-than-97-solution-by-bla-c8kb
\ndef checkIfPangram(self, s: str) -> bool:\n return True if len(set(s))==26 else False\n
blackmishra
NORMAL
2021-05-07T19:03:29.210956+00:00
2021-05-07T19:03:29.211000+00:00
888
false
```\ndef checkIfPangram(self, s: str) -> bool:\n return True if len(set(s))==26 else False\n```
11
1
['Python3']
4
check-if-the-sentence-is-pangram
Simple Python solution_O(n)
simple-python-solution_on-by-smaranjitgh-iduy
Goal: We need to check if all the letters from a-z have occured atleast once or not in a given sentence\n\n### Approach:\n\n- We don\'t care if any letter betwe
smaranjitghose
NORMAL
2021-04-19T12:31:11.152989+00:00
2021-04-22T09:21:04.915262+00:00
1,252
false
__Goal__: We need to check if all the letters from a-z have occured atleast once or not in a given sentence\n\n### Approach:\n\n- We don\'t care if any letter between a-z occurs more than once.\n- So we get only the single occurances of each character in the string by converting it into a set which is an ordered sequen...
11
0
['String', 'Python', 'Python3']
4
check-if-the-sentence-is-pangram
easy
easy-by-bhavya32code-ze1w
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time
Bhavya32code
NORMAL
2023-01-06T01:16:42.514137+00:00
2023-01-06T01:16:42.514208+00:00
750
false
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ --...
10
0
['C++']
0
check-if-the-sentence-is-pangram
Easy || 1 liner || 0 ms || 100% || Explained || Java, C++, Python, JS, Python3
easy-1-liner-0-ms-100-explained-java-c-p-z4nd
A pangram is a sentence where every letter of the English alphabet appears at least once...\nGiven a string sentence containing only lowercase English letters,
PratikSen07
NORMAL
2022-10-17T05:58:56.152960+00:00
2022-10-17T06:05:15.805233+00:00
1,766
false
A pangram is a sentence where every letter of the English alphabet appears at least once...\nGiven a string sentence containing only lowercase English letters, return true if sentence is a pangram, or false otherwise...\n\n# **Java Solution:**\n```\n// Time Complexity: O(n)\n// Space Complexity: O(1)\nclass Solution {\...
10
0
['C', 'Python', 'Java', 'Python3', 'JavaScript']
1
check-if-the-sentence-is-pangram
[Java] 0ms solution faster than %100 of solutions
java-0ms-solution-faster-than-100-of-sol-qve2
\n //Runtime: 0 ms, faster than 100.00% of Java online submissions for Check if the Sentence Is Pangram.\n public boolean checkIfPangram(String sentence)
tunato
NORMAL
2021-09-10T06:58:42.820500+00:00
2021-09-10T06:58:42.820551+00:00
844
false
```\n //Runtime: 0 ms, faster than 100.00% of Java online submissions for Check if the Sentence Is Pangram.\n public boolean checkIfPangram(String sentence) {\n String alphabet = "abcdefghijklmnopqrstuvwxyz"; \n for (char ch : alphabet.toCharArray()) {\n if (sentence.indexOf(ch) == -1)...
10
3
['Java']
3
check-if-the-sentence-is-pangram
JAVA Easy Solution 🔥100% Faster Code 🔥Beginner Friendly🔥
java-easy-solution-100-faster-code-begin-bked
Please UPVOTE if helps.\n\n# Complexity\n- Time complexity: O(n^2)\n Add your time complexity here, e.g. O(n) \n\n# Code\n\nclass Solution {\n public boolean
diyordev
NORMAL
2023-12-16T21:40:07.750968+00:00
2023-12-16T21:40:07.750983+00:00
1,332
false
# Please UPVOTE if helps.\n\n# Complexity\n- Time complexity: $$O(n^2)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n char ch=\'a\';\n for(int i=0; i < 26; i++)\n if(sentence.contains(String.value...
9
0
['Java']
3
check-if-the-sentence-is-pangram
Python || 2 lines, sets || T/S: 94% / 99%
python-2-lines-sets-ts-94-99-by-spauldin-6oqd
\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n\n return len(set(sentence)) == 26\n\nhttps://leetcode.com/problems/check-if-th
Spaulding_
NORMAL
2022-10-24T18:17:40.395736+00:00
2024-06-20T17:16:47.326619+00:00
314
false
```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n\n return len(set(sentence)) == 26\n```\n[https://leetcode.com/problems/check-if-the-sentence-is-pangram/submissions/599255950/](https://leetcode.com/problems/check-if-the-sentence-is-pangram/submissions/599255950/)\n\nI could be wrong,...
9
0
['Python', 'Python3']
1
check-if-the-sentence-is-pangram
Easy to understand Java solution
easy-to-understand-java-solution-by-mann-av5n
The thinking is intuitive:\n\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n boolean a = false;\n boolean b = false;\n
Manny6902
NORMAL
2022-10-17T02:43:38.405975+00:00
2022-10-17T02:43:38.406010+00:00
735
false
The thinking is intuitive:\n\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n boolean a = false;\n boolean b = false;\n boolean c = false;\n boolean d = false;\n boolean e = false;\n boolean f = false;\n boolean g = false;\n boolean h...
8
1
['Java']
4
check-if-the-sentence-is-pangram
Java | Bitwise OR | 1 ms
java-bitwise-or-1-ms-by-ffbit-xjkk
This solution uses 26 bits in an integer for each of the 26 lowercase English letters. Then, it checks if all the 26 least significant bits are set.\n\nTime com
ffbit
NORMAL
2021-04-24T19:27:12.191734+00:00
2021-04-24T19:27:40.598082+00:00
386
false
This solution uses 26 bits in an integer for each of the 26 lowercase English letters. Then, it checks if all the 26 least significant bits are set.\n\nTime complexity: `O(N)`.\nSpace complexity: `O(N)`.\n\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n var seen = 0;\n for (...
8
2
['Java']
1
check-if-the-sentence-is-pangram
c++ || self explanatory
c-self-explanatory-by-rajat_gupta-2hf1
\nclass Solution {\npublic:\n bool checkIfPangram(string sentence) {\n vector<int> vec(26,0);\n for(char ch : sentence){\n vec[ch-\'
rajat_gupta_
NORMAL
2021-04-18T04:02:05.064589+00:00
2021-04-18T04:10:12.370553+00:00
511
false
```\nclass Solution {\npublic:\n bool checkIfPangram(string sentence) {\n vector<int> vec(26,0);\n for(char ch : sentence){\n vec[ch-\'a\']++;\n }\n int zero_count = count(vec.begin(), vec.end(), 0);\n return zero_count==0;\n }\n};\n``` \n\n```\nclass Solution {\npubl...
8
3
['C', 'C++']
1
check-if-the-sentence-is-pangram
Optimizing space complexity using bitmasks (with Intuition)
optimizing-space-complexity-using-bitmas-09j4
\nbool checkIfPangram(string sentence) {\n\tint mask = 0;\n\tfor(char &c : sentence) mask |= (1 << (c - \'a\'));\n\treturn (1 + mask) == (1 << 26);\n}\n\n\nSpac
dhruv10050
NORMAL
2022-10-18T09:13:37.107133+00:00
2022-10-18T15:33:59.178045+00:00
234
false
```\nbool checkIfPangram(string sentence) {\n\tint mask = 0;\n\tfor(char &c : sentence) mask |= (1 << (c - \'a\'));\n\treturn (1 + mask) == (1 << 26);\n}\n```\n\n**Space Complexity**\n*We can reduce our space complexity from* \n* **O( 26 * 4bytes (*int*) )** using set / hashset to\n* **O( 26 * 1byte (*bool*) )** using ...
7
0
['Bit Manipulation', 'C', 'Bitmask']
2
check-if-the-sentence-is-pangram
Simple c++ Soln
simple-c-soln-by-jyot_150-6jvx
\nclass Solution {\npublic: \n bool checkIfPangram(string s) {\n vector<int>v(26);\n for(int p=0;p<s.length();p++){\n v[s[p]-97]++
jyot_150
NORMAL
2022-10-17T04:40:35.278412+00:00
2022-10-17T04:40:35.278452+00:00
1,705
false
```\nclass Solution {\npublic: \n bool checkIfPangram(string s) {\n vector<int>v(26);\n for(int p=0;p<s.length();p++){\n v[s[p]-97]++;\n }\n for(int p=0;p<26;p++){\n if(v[p]==0){\n return false;\n }\n }\n return true;\n }\...
7
0
[]
1
check-if-the-sentence-is-pangram
✅✔ SIMPLE PYTHON3 SOLUTION ✅✔ ONE-LINE FASTEr
simple-python3-solution-one-line-faster-4qn8e
UPVOTE me if it is helpful**\n\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n return(len(set(list(sentence))) == 26)\n
rajukommula
NORMAL
2022-09-14T03:51:30.175993+00:00
2022-09-14T03:51:30.176040+00:00
526
false
***UPVOTE*** me if it is helpful**\n``` \nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n return(len(set(list(sentence))) == 26)\n```
7
0
['Python', 'Python3']
1
check-if-the-sentence-is-pangram
Best Solution for sure :")
best-solution-for-sure-by-hardikjain-zi4h
\nclass Solution {\npublic:\n bool checkIfPangram(string sentence) {\n int res = ((1 << 26) - 1),check = 0;\n for(int i = 0; i < sentence.size(
Hardikjain_
NORMAL
2021-09-25T18:07:57.217426+00:00
2021-09-25T18:07:57.217475+00:00
191
false
```\nclass Solution {\npublic:\n bool checkIfPangram(string sentence) {\n int res = ((1 << 26) - 1),check = 0;\n for(int i = 0; i < sentence.size(); i++)\n {\n check = check | (1 << (sentence[i] - \'a\'));\n if(check == res) return 1;\n }\n return 0;\n }\n}...
7
0
['Bit Manipulation', 'C']
0
check-if-the-sentence-is-pangram
Python One liner faster than 99.15%
python-one-liner-faster-than-9915-by-ano-0n8b
\n\t\tdef checkIfPangram(self, sentence):\n\t\t\treturn len(set(sentence)) == 26\n\t\t\t\n\t\t\t\nEdited: The code is more optamized by @chrislwzy. Thanks buddy
anonymous_coder404
NORMAL
2021-04-24T07:58:10.441532+00:00
2021-04-24T10:52:42.408690+00:00
416
false
\n\t\tdef checkIfPangram(self, sentence):\n\t\t\treturn len(set(sentence)) == 26\n\t\t\t\n\t\t\t\nEdited: The code is more optamized by @chrislwzy. Thanks buddy.
7
2
[]
5
check-if-the-sentence-is-pangram
JS | Hash table | With explanation
js-hash-table-with-explanation-by-karina-5dhh
To solve this problem, we can use a Hash table (in this case, I use Set()). \nThe first thing to do is check for the number of characters in the string, if it i
Karina_Olenina
NORMAL
2022-10-18T08:44:15.163691+00:00
2022-10-18T08:44:15.163731+00:00
545
false
To solve this problem, we can use a Hash table (in this case, I use Set()). \n**The first** thing to do is check for the number of characters in the string, if it is less than 26, it makes no sense to check it. \nIf the string is still larger, we **create a new Set()**, filling it with characters from the string, and s...
6
0
['Hash Table', 'String', 'Ordered Set', 'JavaScript']
1
check-if-the-sentence-is-pangram
Python3 O(n) || O(1) or O(26) # Runtime: 40ms 71.99% || Memory: 13.9mb 54.83%
python3-on-o1-or-o26-runtime-40ms-7199-m-0rrl
\nclass Solution:\n# O(n) || O(1) because we are dealing with lower case english alphabets O(26)\n# Runtime: 40ms 71.99% || Memory: 13.9mb 54.83%\n def c
arshergon
NORMAL
2022-07-07T12:06:02.927668+00:00
2022-07-09T04:48:26.682809+00:00
221
false
```\nclass Solution:\n# O(n) || O(1) because we are dealing with lower case english alphabets O(26)\n# Runtime: 40ms 71.99% || Memory: 13.9mb 54.83%\n def checkIfPangram(self, sentence: str) -> bool:\n allAlpha = [False] * 26\n\n for char in sentence:\n index = ord(char) - ord(\'a\')\n ...
6
0
['Python', 'Python3']
0
check-if-the-sentence-is-pangram
JAVA simple solution 100% faster :)
java-simple-solution-100-faster-by-anant-9jkw
Instead of iterating through sentence string, iterating through these 26 characters will be faster.\n\nclass Solution {\n public boolean checkIfPangram(Strin
AnanthaPerumal
NORMAL
2021-11-08T16:41:36.617081+00:00
2021-11-08T16:41:36.617113+00:00
275
false
Instead of iterating through sentence string, iterating through these 26 characters will be faster.\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n if(sentence.length() < 26) return false;\n for(char c = \'a\' ; c <= \'z\'; c++){\n if(sentence.indexOf(c) == -1){\n...
6
1
['Java']
1
check-if-the-sentence-is-pangram
C++ | Bit Manipulation
c-bit-manipulation-by-wrong_answer-zm9o
Edit : Adding explanation\n\nWe need to check if a string has all the 26 lowercase english alphabets from \'a\' to \'z\'. Also, we do not care about the number
wrong_answer
NORMAL
2021-06-21T13:07:51.416966+00:00
2021-06-27T02:46:30.432860+00:00
165
false
Edit : Adding explanation\n\nWe need to check if a string has all the 26 lowercase english alphabets from \'a\' to \'z\'. Also, we do not care about the number of occurances, the only thing we need to check is : each character should have atleast 1 occurance. So we can use a set and keep inserting all the characters of...
6
0
['Bit Manipulation']
1
check-if-the-sentence-is-pangram
Python3: one-line solution
python3-one-line-solution-by-lopkopz-phi6
\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n return all(letter in sentence for letter in \'abcdefghijklmnopqrstuvwxyz\')\n\n
Lopkopz
NORMAL
2021-06-04T11:52:02.133377+00:00
2021-06-04T11:52:02.133413+00:00
445
false
```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n return all(letter in sentence for letter in \'abcdefghijklmnopqrstuvwxyz\')\n```\nRuntime: 28 ms, **faster than 86.51%** of Python3 online submissions for Check if the Sentence Is Pangram.\nMemory Usage: 14 MB, **less than 91.22%** of P...
6
1
['Python']
3
check-if-the-sentence-is-pangram
java beginner friendly || constant space
java-beginner-friendly-constant-space-by-pfep
Given constraint :\nsentence consists of lowercase English letters.\nIdea is to make a 26 size array (representing a to z ) and mark the presence of character i
himanshuchhikara
NORMAL
2021-04-18T04:48:12.417482+00:00
2021-04-18T04:49:08.583175+00:00
466
false
**Given constraint :**\n`sentence consists of lowercase English letters.`\nIdea is to make a 26 size array (representing a to z ) and mark the presence of character in it.\n\n**CODE:**\n```\n public boolean checkIfPangram(String sentence) {\n boolean[] arr=new boolean[26];\n for(char ch:sentence.toCharAr...
6
1
['Java']
1
check-if-the-sentence-is-pangram
[Java/Python 3] Two codes: Count the chars in Sentence.
javapython-3-two-codes-count-the-chars-i-211b
Method 1\n\nJava\n\njava\n public boolean checkIfPangram(String sentence) {\n int[] cnt = new int[26];\n for (int i = 0; i < sentence.length();
rock
NORMAL
2021-04-18T04:06:54.875877+00:00
2021-04-18T17:14:19.409630+00:00
539
false
**Method 1**\n\n**Java**\n\n```java\n public boolean checkIfPangram(String sentence) {\n int[] cnt = new int[26];\n for (int i = 0; i < sentence.length(); ++i) {\n ++cnt[sentence.charAt(i) - \'a\'];\n }\n for (int i = 0; i < 26; ++i) {\n if (cnt[i] == 0) {\n ...
6
0
[]
2
check-if-the-sentence-is-pangram
"Simple" ahh solution
simple-ahh-solution-by-anaghabharadwaj-b1en
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nTo check if a sentence
AnaghaBharadwaj
NORMAL
2024-11-04T21:40:33.221965+00:00
2024-11-04T21:40:33.222011+00:00
755
false
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nTo check if a sentence is a pangram, initialize a HashSet to store unique characters from the input. Iterate through each character in the sentence, adding it to the s...
5
0
['Java']
2
check-if-the-sentence-is-pangram
Simple JAVA Solution for beginners. 0ms. Beats 100%.
simple-java-solution-for-beginners-0ms-b-g4cm
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time
sohaebAhmed
NORMAL
2023-05-25T10:07:06.493287+00:00
2023-05-25T10:07:06.493342+00:00
579
false
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ --...
5
0
['Hash Table', 'String', 'Java']
0
check-if-the-sentence-is-pangram
Java Basic and Simple logic, 0ms 100% faster, 40.6 MB beats 76% in memory Clean Code
java-basic-and-simple-logic-0ms-100-fast-ug9v
Intuition\nRun a loop over letter a - z and check whether each char occurs in the String\n\n# Approach\nIterate over 26 available alphabets and check whether we
thisisgmr
NORMAL
2023-05-01T07:50:39.160736+00:00
2023-07-12T14:49:43.388306+00:00
641
false
# Intuition\nRun a loop over letter a - z and check whether each char occurs in the String\n\n# Approach\nIterate over 26 available alphabets and check whether we have the character in the String.\n\n# Complexity\n- Time complexity:\nO(1). Instead of running over every character in the string which can range from 0 to ...
5
0
['String', 'Java']
0
check-if-the-sentence-is-pangram
Easy and Simple- Java Solution using Arrays
easy-and-simple-java-solution-using-arra-yi2h
\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n //declare a array to maintain every char occurance\n int a[]=new int[26
dhirenojha01
NORMAL
2022-10-17T06:28:01.360992+00:00
2022-10-17T06:28:01.361030+00:00
988
false
```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n //declare a array to maintain every char occurance\n int a[]=new int[26];\n //traverse String\n for(int i=0;i<sentence.length();i++)\n {\n int ch;\n ch=sentence.charAt(i);\n ...
5
0
['Array', 'Java']
2
check-if-the-sentence-is-pangram
🗓️ Daily LeetCoding Challenge October, Day 17
daily-leetcoding-challenge-october-day-1-9asu
This problem is the Daily LeetCoding Challenge for October, Day 17. Feel free to share anything related to this problem here! You can ask questions, discuss wha
leetcode
OFFICIAL
2022-10-17T00:00:14.369831+00:00
2022-10-17T00:00:14.369906+00:00
2,229
false
This problem is the Daily LeetCoding Challenge for October, Day 17. Feel free to share anything related to this problem here! You can ask questions, discuss what you've learned from this problem, or show off how many days of streak you've made! --- If you'd like to share a detailed solution to the problem, please c...
5
0
[]
75
check-if-the-sentence-is-pangram
Begineer Friendly
begineer-friendly-by-diljotsingh04-koxr
\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n int[] arr = new int[26];\n \n // checks the frequency of the alp
diljotsingh04
NORMAL
2022-09-28T10:17:42.684899+00:00
2022-09-28T10:17:42.684941+00:00
1,146
false
```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n int[] arr = new int[26];\n \n // checks the frequency of the alphabets\n for(var i: sentence.toCharArray()){\n arr[i - \'a\']++;\n }\n \n // checks if any of the arr index contains z...
5
0
['String', 'Java']
0
check-if-the-sentence-is-pangram
[0ms] Java Easy Solution w/ Array && .indexOf
0ms-java-easy-solution-w-array-indexof-b-573q
\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n if (sentence.length() < 26) {\n return false;\n }\n\n
RexRK
NORMAL
2022-09-20T14:54:23.717885+00:00
2022-09-20T14:54:23.717927+00:00
284
false
```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n if (sentence.length() < 26) {\n return false;\n }\n\n int[] tracer = new int[26]; //For Storing Index of a-z charecters from sentence;\n char alpha = \'a\'; \n for (int i = 0; i < tracer.length; i...
5
0
['Java']
0
check-if-the-sentence-is-pangram
Beginner friendly [Java/JavaScript/Python] Solution
beginner-friendly-javajavascriptpython-s-uf2s
Python\n\nclass Solution(object):\n def checkIfPangram(self, sentence):\n return len(set(sentence)) == 26\n\nJavaScript\n\nvar checkIfPangram = functi
HimanshuBhoir
NORMAL
2022-01-12T03:07:44.095765+00:00
2022-10-17T07:36:56.830092+00:00
754
false
**Python**\n```\nclass Solution(object):\n def checkIfPangram(self, sentence):\n return len(set(sentence)) == 26\n```\n**JavaScript**\n```\nvar checkIfPangram = function(sentence) {\n return new Set(sentence).size == 26;\n};\n```\n**Java**\n```\nclass Solution {\n public boolean checkIfPangram(String se...
5
0
['Python', 'Java', 'JavaScript']
3
check-if-the-sentence-is-pangram
Easy Java Solution
easy-java-solution-by-zcyuzz-ssnq
\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n int[] count = new int[26];\n for (char ch : sentence.toCharArray()) {\n
zcyuzz
NORMAL
2021-08-24T22:23:30.593193+00:00
2021-08-24T22:23:30.593229+00:00
483
false
```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n int[] count = new int[26];\n for (char ch : sentence.toCharArray()) {\n count[ch - \'a\']++;\n }\n for (int i : count) {\n if (i == 0) return false;\n }\n return true;\n }\n}\...
5
0
['Java']
4
check-if-the-sentence-is-pangram
simple cpp solution
simple-cpp-solution-by-ashuborla-tj50
bool checkIfPangram(string sentence) {\n \n sets;\n for(int i=0;i<sentence.size();i++)\n s.insert(sentence[i]);\n int n=s
ashuborla
NORMAL
2021-05-15T17:38:08.834076+00:00
2021-05-15T17:38:08.834119+00:00
167
false
bool checkIfPangram(string sentence) {\n \n set<char>s;\n for(int i=0;i<sentence.size();i++)\n s.insert(sentence[i]);\n int n=s.size();\n if(n==26)\n return true;\n else\n return false;\n \n }
5
1
[]
4
check-if-the-sentence-is-pangram
Simple Solution and easy to understand || [ Java] ✅✅
simple-solution-and-easy-to-understand-j-5d78
Intuition\n##### Store every charecter at string in HashMap and check at all english charecters if it exist or not\n\n# Approach\n### Step 1 : \n### Looping at
elocklymuhamed
NORMAL
2024-04-15T11:34:08.576367+00:00
2024-04-17T13:02:36.647854+00:00
467
false
# Intuition\n##### Store every charecter at string in HashMap and check at all english charecters if it exist or not\n\n# Approach\n### Step 1 : \n### Looping at all sentence charecter and store it at HashMap we used HashMap as it give us time O(1) when check the existence of the cherecter \n```\nmap.containsKey(chInde...
4
0
['Java']
0
check-if-the-sentence-is-pangram
Beats 100.00% of user || Step by Step Explain || Easy to Understand || Using Hashtable ||
beats-10000-of-user-step-by-step-explain-2jbq
Abhiraj Pratap Singh \n\n---\n\n# if you like the solution please UPVOTE it .....\n\n---\n\n# Intuition\n Describe your first thoughts on how to solve this prob
abhirajpratapsingh
NORMAL
2024-02-01T16:18:52.812722+00:00
2024-02-01T16:18:52.812753+00:00
139
false
# Abhiraj Pratap Singh \n\n---\n\n# if you like the solution please UPVOTE it .....\n\n---\n\n# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n- The code checks whether the input string sentence is a pangram or not.\n---\n\n![Screenshot (47).png](https://assets.leetcode.com/users/images...
4
0
['Hash Table', 'String', 'String Matching', 'C++']
0
check-if-the-sentence-is-pangram
Easy and simple approach
easy-and-simple-approach-by-kanishakpran-gsoc
Intuition\nThe goal is to check if the given string s contains all the letters of the alphabet at least once, making it a pangram. The provided code appears to
kanishakpranjal
NORMAL
2024-01-16T16:56:32.955211+00:00
2024-01-16T16:56:32.955243+00:00
326
false
# Intuition\nThe goal is to check if the given string `s` contains all the letters of the alphabet at least once, making it a pangram. The provided code appears to iterate through the alphabet and checks if each letter is present in the input string. The count of letters found is then compared to the total number of le...
4
0
['Java']
0
check-if-the-sentence-is-pangram
Easy Solution for Beginners in java
easy-solution-for-beginners-in-java-by-t-1p5k
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time
thehighpriestess
NORMAL
2023-09-07T00:24:08.199737+00:00
2023-09-07T00:24:08.199756+00:00
469
false
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ --...
4
0
['Java']
1
check-if-the-sentence-is-pangram
Easy Solution- Java and Python(0ms Runtime, Optimised)
easy-solution-java-and-python0ms-runtime-jebr
Code\njava []\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n for (int i=97;i<=122;i++)\n {\n if(sentence.i
phalakbh
NORMAL
2023-07-31T18:21:00.533982+00:00
2023-07-31T18:21:00.534025+00:00
231
false
# Code\n```java []\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n for (int i=97;i<=122;i++)\n {\n if(sentence.indexOf((char)i)<0)\n {\n return false;\n }\n }\n return true;\n }\n}\n```\n```python []\nclass Soluti...
4
0
['String', 'Python', 'Java']
1
check-if-the-sentence-is-pangram
Easy and highly optimized solution Java and Python ||Beats 100% Runtime||
easy-and-highly-optimized-solution-java-83tfr
Java []\n public boolean checkIfPangram(String sentence) {\n for (int i=97;i<=122;i++)\n {\n if(sentence.indexOf((char)i)<0)\n
_veer_singh04_
NORMAL
2023-07-31T18:18:48.706662+00:00
2023-07-31T18:18:48.706701+00:00
313
false
```Java []\n public boolean checkIfPangram(String sentence) {\n for (int i=97;i<=122;i++)\n {\n if(sentence.indexOf((char)i)<0)\n {\n return false;\n }\n }\n return true;\n }\n}\n```\n```python []\nclass Solution(object):\n def checkIf...
4
0
['Python', 'Java']
1
check-if-the-sentence-is-pangram
Beats - 100% || Simple - Easy to Understand Solution
beats-100-simple-easy-to-understand-solu-zq6e
\n\n# Code\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n for(char i = \'a\'; i<=\'z\'; i++){\n if(sentence.index
tauqueeralam42
NORMAL
2023-07-17T08:46:50.590267+00:00
2023-07-17T08:46:50.590295+00:00
298
false
\n\n# Code\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n for(char i = \'a\'; i<=\'z\'; i++){\n if(sentence.indexOf(i)<0)\n return false;\n }\n return true;\n }\n}\n```
4
0
['Hash Table', 'String', 'C++', 'Java']
0
check-if-the-sentence-is-pangram
JAVA | 100 % | 0 ms
java-100-0-ms-by-firdavs06-l69v
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time
Firdavs06
NORMAL
2023-02-27T07:35:23.785207+00:00
2023-02-27T07:35:23.785232+00:00
155
false
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ --...
4
0
['Java']
1
check-if-the-sentence-is-pangram
JS/TS one-liner using Set || Beats 94%
jsts-one-liner-using-set-beats-94-by-cim-yitn
Intuition\nJavascript\'s set contains only unique values, and total of lowercase english alphabet is 26.\n\n# Approach\n1. We split the characters in the senten
cimbraien
NORMAL
2023-02-15T14:11:32.276233+00:00
2023-02-15T14:13:37.905429+00:00
353
false
# Intuition\nJavascript\'s set contains only unique values, and total of lowercase english alphabet is 26.\n\n# Approach\n1. We split the characters in the sentence into an array.\n2. Convert the array into a set.\n3. Check if the set\'s size is equal to 26.\n\n# Complexity\n- Time complexity:\n$$O(n)$$\n\n# Code\n```\...
4
0
['TypeScript', 'JavaScript']
1
check-if-the-sentence-is-pangram
O(1) Java Solution Easy to Understand.
o1-java-solution-easy-to-understand-by-j-9l3v
\n# Complexity\n- Time complexity:\nO(1)\n\n- Space complexity:\nO(N)\n\n# Code\n\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n\n
jaiyadav
NORMAL
2023-01-01T04:51:53.759686+00:00
2023-01-01T04:51:53.759737+00:00
703
false
\n# Complexity\n- Time complexity:\nO(1)\n\n- Space complexity:\nO(N)\n\n# Code\n```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n\n Character[] charArray = \n sentence.chars().mapToObj(c -> (char)c).toArray(Character[]::new); //don\'t get confused about it because i also copied it fro...
4
0
['Hash Table', 'String', 'Java']
0
check-if-the-sentence-is-pangram
JAVA || SET || 2 LINE CODE
java-set-2-line-code-by-sharforaz_rahman-nipn
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\nturn string into character array and then put those values into SET and a
sharforaz_rahman
NORMAL
2022-11-23T12:07:20.982407+00:00
2023-05-09T13:16:02.310283+00:00
50
false
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nturn string into **character array** and then put those values into **SET** and as we know that SET doesn\'t contain duplicate values, so after putting values in set, if the **size of set is less than 26,** then it is false,...
4
0
['Java']
0
check-if-the-sentence-is-pangram
✅ [Python/Rust] just one-liners using hashset... (with detailed comments)
pythonrust-just-one-liners-using-hashset-uevo
IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.\n\nPython. This solution employs a simple one-liner using set. It demonstrated 28 ms runtime (97.56%) and used 13.8 MB
stanislav-iablokov
NORMAL
2022-10-17T12:41:01.157644+00:00
2022-10-23T12:35:55.917863+00:00
369
false
**IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.**\n\n**Python.** This [**solution**](https://leetcode.com/submissions/detail/824403614/) employs a simple one-liner using *set*. It demonstrated **28 ms runtime (97.56%)** and used **13.8 MB memory (95.55%)**. Time complexity is linear: **O(n)**. Space complexity is constant:...
4
0
['Python', 'Rust']
0
check-if-the-sentence-is-pangram
Daily LeetCoding Challenge October, Day 17
daily-leetcoding-challenge-october-day-1-cr7l
The approach followed here is very simple. We store the frequency of charecters in an array or a vector. Then we simply traverse through the array or vector to
deleted_user
NORMAL
2022-10-17T06:03:08.121533+00:00
2022-10-17T06:03:08.121595+00:00
2,878
false
The approach followed here is very simple. We store the frequency of charecters in an array or a vector. Then we simply traverse through the array or vector to check if element is present at least once.\n\n```\nclass Solution {\npublic:\n bool checkIfPangram(string sentence)\n {\n int start=\'a\',end=\'z\'...
4
0
['Array', 'String', 'C']
3
check-if-the-sentence-is-pangram
100% Faster Solution with 0 ms
100-faster-solution-with-0-ms-by-prayash-u3sy
\nI come with the solution to this question with three different approach:\nFirst Approach:\nUsing String \nclass Solution {\n public boolean checkIfPangram(
PRAYASH_GUPTA
NORMAL
2022-08-22T04:52:12.574384+00:00
2022-08-22T04:52:12.574423+00:00
214
false
```\nI come with the solution to this question with three different approach:\nFirst Approach:\nUsing String \nclass Solution {\n public boolean checkIfPangram(String sentence) {\n if(sentence.length()<26){\n return false;\n }\n String s="abcdefghijklmnopqrstuvwxyz";\n for(int i=0;i<s...
4
0
['Array', 'String', 'Java']
0
check-if-the-sentence-is-pangram
Python easy solution using dictionary
python-easy-solution-using-dictionary-by-sa5e
```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n appear = {}\n for i in sentence:\n if i not in appear:\n
abdulhamid-egamberdiyev
NORMAL
2022-03-21T05:17:06.394327+00:00
2022-03-21T05:17:06.394370+00:00
216
false
```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n appear = {}\n for i in sentence:\n if i not in appear:\n appear[i] = 1\n else:\n appear[i] += 1\n if len(appear) == 26:\n return True\n return False
4
0
['Hash Table', 'Python']
0
check-if-the-sentence-is-pangram
Java || 3 Line Solution || 88% Faster || Easy to understand
java-3-line-solution-88-faster-easy-to-u-x0ch
\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n for(char c = \'a\'; c <= \'z\'; c++)\n if(!sentence.contains(""+c)
arpit2304
NORMAL
2022-02-16T14:48:44.728603+00:00
2022-02-16T14:48:44.728636+00:00
219
false
```\nclass Solution {\n public boolean checkIfPangram(String sentence) {\n for(char c = \'a\'; c <= \'z\'; c++)\n if(!sentence.contains(""+c))return false;\n return true;\n }\n}\n```\nPlease **UPVOTE** if you find this solution helpful.\nThanks : )
4
0
['Java']
1
check-if-the-sentence-is-pangram
Short JavaScript Solution.
short-javascript-solution-by-himanshubho-0mu5
Time Complexity : O(n)\njavascript []\nvar checkIfPangram = function(sentence) {\n return new Set(sentence.split("")).size == 26;\n};\n\n
HimanshuBhoir
NORMAL
2022-01-12T03:04:24.278438+00:00
2023-01-09T06:24:23.433013+00:00
577
false
**Time Complexity : O(n)**\n```javascript []\nvar checkIfPangram = function(sentence) {\n return new Set(sentence.split("")).size == 26;\n};\n```\n
4
0
['JavaScript']
2
check-if-the-sentence-is-pangram
Python one line simple solution
python-one-line-simple-solution-by-tovam-ueqc
Python :\n\n\ndef checkIfPangram(self, sentence: str) -> bool:\n\treturn set(sentence) == set(list(string.ascii_lowercase)) \n\n\nLike it ? please upvote !
TovAm
NORMAL
2021-11-06T23:47:24.323981+00:00
2021-11-06T23:48:21.180314+00:00
158
false
**Python :**\n\n```\ndef checkIfPangram(self, sentence: str) -> bool:\n\treturn set(sentence) == set(list(string.ascii_lowercase)) \n```\n\n**Like it ? please upvote !**
4
0
['Python', 'Python3']
1
check-if-the-sentence-is-pangram
Python solution
python-solution-by-saura_v-ahtw
\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n return len(set(sentence)) == 26\n
Saura_v
NORMAL
2021-08-16T15:21:57.203534+00:00
2021-08-16T15:21:57.203582+00:00
184
false
```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n return len(set(sentence)) == 26\n```
4
0
['Ordered Set', 'Python']
0
check-if-the-sentence-is-pangram
Python3 faster than 86%
python3-faster-than-86-by-truejacobg-4dns
\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n if len(set(sentence.lower())) == 26:\n return True\n return F
TrueJacobG
NORMAL
2021-06-08T12:23:50.209024+00:00
2021-06-08T12:23:50.209091+00:00
151
false
```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n if len(set(sentence.lower())) == 26:\n return True\n return False\n```
4
0
[]
1
check-if-the-sentence-is-pangram
C# Simple One liner
c-simple-one-liner-by-hbti_ankit1994-6erw
\npublic class Solution {\n public bool CheckIfPangram(string s) {\n return ((new HashSet<char>(s)).Count == 26); \n}\n\n\nAnother Approach:\n\np
hbti_ankit1994
NORMAL
2021-05-12T16:45:15.719737+00:00
2021-05-13T07:54:17.644611+00:00
152
false
```\npublic class Solution {\n public bool CheckIfPangram(string s) {\n return ((new HashSet<char>(s)).Count == 26); \n}\n```\n\nAnother Approach:\n```\npublic class Solution {\n public bool CheckIfPangram(string s) {\n return ((s.ToCharArray()).Distinct().Count()) == 26;\n }\n}\n```\n\n\nAn...
4
0
[]
2
check-if-the-sentence-is-pangram
[C++] Simple Solution || O(N) || Easy Understanding
c-simple-solution-on-easy-understanding-ucztf
C++ solution:\n\nclass Solution {\npublic:\n bool checkIfPangram(string s) {\n vector<int>vis(26,0);\n int count=0;\n for(auto i:s)\n
millenniumdart09
NORMAL
2021-04-18T11:10:37.113546+00:00
2021-04-18T11:10:37.113581+00:00
344
false
**C++ solution:**\n```\nclass Solution {\npublic:\n bool checkIfPangram(string s) {\n vector<int>vis(26,0);\n int count=0;\n for(auto i:s)\n {\n if(!vis[i-\'a\'])\n {\n vis[i-\'a\']=1;\n count++;\n }\n }\n if(cou...
4
1
['C']
0
check-if-the-sentence-is-pangram
Rust solution
rust-solution-by-bigmih-xp8w
\nimpl Solution {\n pub fn check_if_pangram(sentence: String) -> bool {\n sentence\n .as_bytes()\n .iter()\n .fold([f
BigMih
NORMAL
2021-04-18T08:30:50.047607+00:00
2021-04-25T11:52:31.671418+00:00
214
false
```\nimpl Solution {\n pub fn check_if_pangram(sentence: String) -> bool {\n sentence\n .as_bytes()\n .iter()\n .fold([false; 26], |mut count_arr, &x| {\n count_arr[(x - b\'a\') as usize] = true;\n count_arr\n })\n .iter()\n ...
4
0
['Array', 'Rust']
2
check-if-the-sentence-is-pangram
Simple Python Solution
simple-python-solution-by-lokeshsk1-tqjh
\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n\t\treturn len(set(sentence))==26\n\n\n\nclass Solution:\n def checkIfPangram(self,
lokeshsk1
NORMAL
2021-04-18T04:10:28.817998+00:00
2021-04-18T04:12:01.967596+00:00
231
false
```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n\t\treturn len(set(sentence))==26\n```\n\n```\nclass Solution:\n def checkIfPangram(self, sentence: str) -> bool:\n for i in range(97,123):\n if chr(i) not in sentence:\n return False\n return True\n``...
4
1
[]
2
check-if-the-sentence-is-pangram
Simple unordered map solution || c++
simple-unordered-map-solution-c-by-ujjwa-tdkw
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time
ujjwalkathait
NORMAL
2024-01-21T18:25:50.630218+00:00
2024-01-21T18:25:50.630250+00:00
74
false
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O{n}\n<!-- Add your space complexity here, e.g. $...
3
0
['Array', 'Hash Table', 'C++']
0
check-if-the-sentence-is-pangram
Hash Map Solution (with step by step explanation)
hash-map-solution-with-step-by-step-expl-50ir
Intuition\nFor this problem we would use hashmap\n\n# Approach\nWe use hashmap for this problem to store all alphabet letter from input string, and then simply
alekseyvy
NORMAL
2023-09-10T19:02:49.350875+00:00
2023-09-10T19:02:49.350896+00:00
173
false
# Intuition\nFor this problem we would use hashmap\n\n# Approach\nWe use hashmap for this problem to store all alphabet letter from input string, and then simply check that size of our hashmap are equals to size of english alphabet.\n# Complexity\n- Time complexity:\nO(n) - we iterate only once to get all letters\n- Sp...
3
0
['Hash Table', 'Java']
0
check-if-the-sentence-is-pangram
Damm Easyyyy
damm-easyyyy-by-hkd-k409
Important\nPlease upvote before reading\n\n\n# Intuition\nRemember the alphabet u learnt in primary class\n\n# Approach\nSexy\n\n# Complexity\n- Time complexity
HKD_
NORMAL
2023-09-03T14:30:57.091056+00:00
2023-09-03T14:30:57.091086+00:00
264
false
# Important\nPlease upvote before reading\n\n\n# Intuition\nRemember the alphabet u learnt in primary class\n\n# Approach\nSexy\n\n# Complexity\n- Time complexity:\nO(N)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\n public boolean checkIfPangram(String s) {\n int l=s.length();\n int i...
3
0
['Java']
2
check-if-the-sentence-is-pangram
C# solution with explanation | Beats 100% of C# solutions
c-solution-with-explanation-beats-100-of-ouxy
Approach\nI just created a hashset of chars in the given string. Then checked every letter in English alphabet if it exists in the hashset using the letter\'s A
Muhammad-Diyor
NORMAL
2023-08-05T14:27:19.554678+00:00
2023-08-07T05:15:08.337245+00:00
297
false
# Approach\nI just created a hashset of chars in the given string. Then checked every letter in English alphabet if it exists in the hashset using the letter\'s ASCII code.\n\n# Runtime\nBeats 100% of solutions with C#\n\n![image.png](https://assets.leetcode.com/users/images/daec8957-9e13-4870-9d05-a8889478deab_1691245...
3
0
['C#']
1