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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Please contribute to this repository to help it make better. Any change like new
* If you like eclipse instead of intellij install eclipse https://eclipse.org/downloads/

<h3> Set up your desktop </h3>

* Pull the git repository. Go to command line and type git clone https://github.com/mission-peace/interview.git
* Go to root directory of checked out project.
* Run ./gradlew idea to generate idea related classes
Expand Down
8 changes: 1 addition & 7 deletions src/com/interview/recursion/StringPermutation.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ public class StringPermutation {
public List<String> permute(char input[]) {
Map<Character, Integer> countMap = new TreeMap<>();
for (char ch : input) {
countMap.compute(ch, (key, val) -> {
if (val == null) {
return 1;
} else {
return val + 1;
}
});
countMap.put(ch, countMap.getOrDefault(ch, 0)+1);
}
char str[] = new char[countMap.size()];
int count[] = new int[countMap.size()];
Expand Down