Skip to content
Open
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
9 changes: 9 additions & 0 deletions .idea/2025-software-dev-problem-set.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions solutions/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions solutions/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions solutions/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions solutions/.idea/solutions.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions solutions/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions solutions/Group_Anagram.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import java.util.*;

public class Group_Anagram {
public List<List<String>> groupAnagrams(String[] strs) {
Map<String, List<String>> res = new HashMap<>;

for(String s : strs){
int[] count = new int[26];
for(char c : s.toCharArray()){
count[c - 'a']++;
}

String key = Arrays.toString(count);
res.putIfAbsent(key, new ArrayList<>);
res.get(key).add(s);
}
return new ArrayList<>(res.values());
}
}
20 changes: 20 additions & 0 deletions solutions/Two_Sum.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import java.util.HashMap;

public class Two_Sum {
public int[] twoSum(int[] nums, int target) {
HashMap<Integer, Integer> prevMap = new HashMap<>();

for (int i = 0; i < nums.length; i++) {
int num = nums[i];
int diff = target - num;


if (prevMap.containsKey(diff)) {
return new int[]{prevMap.get(diff), i};
}
prevMap.put(num, i);
}
return new int[]{};
}
}

Empty file added solutions/exercise solutions.js
Empty file.