Skip to content

Commit c6277e7

Browse files
committed
Runtime: 68 ms (Top 48.70%) | Memory: 45.5 MB (Top 96.95%)
1 parent 41aa4de commit c6277e7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/algorithms/S/Search Suggestions System/Search Suggestions System.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
class Solution
1+
// Runtime: 68 ms (Top 48.70%) | Memory: 45.5 MB (Top 96.95%)
2+
class Solution
23
{
3-
public List<List<String>> suggestedProducts(String[] products, String searchWord)
4+
public List<List<String>> suggestedProducts(String[] products, String searchWord)
45
{
56
PriorityQueue<String> pq= new PriorityQueue<String>();
6-
List<List<String>> res= new LinkedList<List<String>>();
7+
List<List<String>> res= new LinkedList<List<String>>();
78
List<String> segment= new LinkedList<String>();
89
for(int i=0;i<products.length;i++)
910
pq.offer(products[i]);
10-
11+
1112
for(int j=0;j<searchWord.length();j++)
1213
{
1314
segment= new LinkedList<String>();

0 commit comments

Comments
 (0)