* Added code to find Articulation Points and Bridges
* tried to solve clang-formant test
* removed new line at EOF to get lint to pass
* feature: Added Ahocorasick Algorithm
* fixed lint using clang-format
* removed datastructures/graphs/ArticulationPointsAndBridge.java from this branch
* removed main, since test-file is added. Also modified and renamed few functions.
* Added test-file for AhoCorasick Algorithm
* Modified some comments in test-file
* Modified some comments in AhoCorasick.java
* lint fix
* added few more test cases
* Modified some comments
* Change all class fields to private, added initializeSuffixLinksForChildNodesOfTheRoot() method, hashmap string search position (also has previous index based search), removed java.util.*
* Added Missing Test-Cases and more
* minor text changes
* added direct test check i.e. defining a variable expected and just checking if res and expected are equal.
* Created New Class Trie, merged 'buildTrie and buildSuffixAndOutputLinks' with 'Trie constructor'. Merged setUpStartPoints with searchIn. Now AhoCorasick contains -> inner class: Trie, Node. Methods: search and convert. Trie has -> Methods : constructor and searchIn
* Updated TestFile according to the updated AhoCorasick Class. Added Few more test cases
* updated - broken down constructor to relavent parts, made string final, made res local to searchIn(), doxygen-like style
* lint fix clang
* Updated Tests Files
* Added final field to Node class setters and Trie Constructor arguments, removed getTrieRoot() and some unnecessory comments, renamed [old -> new]: res -> positionByStringIndexValue, removed if condition from setupStartPoints()
* updated test file
* lint fix clang
* minor chage - 'removed a comment'
* added final fields to some arguments, class and variables, added a method initializePositionByStringIndexValue()
* updated to remove * inclusion and added the required modules only
* Implemented a new class PatternPositionRecorder to wrap up the position recording in searchIn()
* Added final fields to PatternPositionRecorder Class
* style: mark default constructor of `AhoCorasick` as `private`
* style: remoce redundant `public`
---------
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
* return a string of the words in reverse order concatenated by a single space.
Input: s = "the sky is blue"
Output: "blue is sky the"
* return a string of the words in reverse order concatenated by a single space.
Input: s = "the sky is blue"
Output: "blue is sky the"
* space reduce
* removed main method
* added test cases
* formatting fix
* formatting fix
* worked on pr reviews
* formatting fix
* private constructor added
* added test case for when string contains white space
* simplified method
* fix issue
* formatting issues fix
* fixed issue
* code refactor
* documented method
* worked on pr comments
* docs: add missing space
* tests: express as `ParameterizedTest`
---------
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
Co-authored-by: vil02 <vil02@o2.pl>
* Update Pangram.java using Java Collections
A simple separate function isPangramOrNot(String s) has been created which implements the Pangram checking of a string using Java Collection Framework approach.
* Update Pangram.java using Java Collections
* Updated some linting errors in Pangram.java
* Update src/main/java/com/thealgorithms/strings/Pangram.java
Co-authored-by: Debasish Biswas <debasishbsws.dev@gmail.com>
* Updated Pangram.java
Method name updated to - isPangramUsingSet(String s)
* Updated the testcases PangramTest.java
Successfully updated the testcases in this same PR branch
---------
Co-authored-by: Debasish Biswas <debasishbsws.dev@gmail.com>
* Create MyAtoi.java
There is a method in C++, which converts String to an Integer, called Atoi function, this is my own implementation of this function.
* Update directory
* Update MyAtoi.java
* Create MyAtoiTest.java
* Update directory
* Update directory
* Update directory
* Update MyAtoi.java
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>