style: enable InvalidJavadocPosition in checkstyle (#5237)

enable style InvalidJavadocPosition

Co-authored-by: Samuel Facchinello <samuel.facchinello@piksel.com>
This commit is contained in:
Samuel Facchinello
2024-06-18 19:34:22 +02:00
committed by GitHub
parent 39e065437c
commit 74e51990c1
37 changed files with 284 additions and 358 deletions

View File

@ -12,8 +12,24 @@ import java.util.HashMap;
*/
public class Anagrams {
// 4 approaches are provided for anagram checking. approach 2 and approach 3 are similar but
// differ in running time.
/**
* 4 approaches are provided for anagram checking. approach 2 and approach 3 are similar but
* differ in running time.
* OUTPUT :
* first string ="deal" second string ="lead"
* Output: Anagram
* Input and output is constant for all four approaches
* 1st approach Time Complexity : O(n logn)
* Auxiliary Space Complexity : O(1)
* 2nd approach Time Complexity : O(n)
* Auxiliary Space Complexity : O(1)
* 3rd approach Time Complexity : O(n)
* Auxiliary Space Complexity : O(1)
* 4th approach Time Complexity : O(n)
* Auxiliary Space Complexity : O(n)
* 5th approach Time Complexity: O(n)
* Auxiliary Space Complexity: O(1)
*/
public static void main(String[] args) {
String first = "deal";
String second = "lead";
@ -23,22 +39,6 @@ public class Anagrams {
System.out.println(nm.approach1(first, second)); /* To activate methods for different approaches*/
System.out.println(nm.approach3(first, second)); /* To activate methods for different approaches*/
System.out.println(nm.approach4(first, second)); /* To activate methods for different approaches*/
/**
* OUTPUT :
* first string ="deal" second string ="lead"
* Output: Anagram
* Input and output is constant for all four approaches
* 1st approach Time Complexity : O(n logn)
* Auxiliary Space Complexity : O(1)
* 2nd approach Time Complexity : O(n)
* Auxiliary Space Complexity : O(1)
* 3rd approach Time Complexity : O(n)
* Auxiliary Space Complexity : O(1)
* 4th approach Time Complexity : O(n)
* Auxiliary Space Complexity : O(n)
* 5th approach Time Complexity: O(n)
* Auxiliary Space Complexity: O(1)
*/
}
boolean approach1(String s, String t) {