From 2f723ac24c14175ad9962c4a9d6a64c5db0310bd Mon Sep 17 00:00:00 2001 From: Manan-Rathi Date: Sun, 3 Oct 2021 21:43:42 +0530 Subject: [PATCH 1/2] Fix typos in comments --- Conversions/OctalToHexadecimal.java | 4 ++-- DynamicProgramming/RegexMatching.java | 4 ++-- Sorts/BitonicSort.java | 2 +- Sorts/PancakeSort.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Conversions/OctalToHexadecimal.java b/Conversions/OctalToHexadecimal.java index 4035ada70432..589fefbb5e9a 100644 --- a/Conversions/OctalToHexadecimal.java +++ b/Conversions/OctalToHexadecimal.java @@ -51,10 +51,10 @@ public static void main(String args[]) { // Take octal number as input from user in a string String oct = input.next(); - // Pass the octal number to function and get converted deciaml form + // Pass the octal number to function and get converted decimal form int decimal = octToDec(oct); - // Pass the decimla number to function and get converted Hex form of the number + // Pass the decimal number to function and get converted Hex form of the number String hex = decimalToHex(decimal); System.out.println("The Hexadecimal equivalant is: " + hex); input.close(); diff --git a/DynamicProgramming/RegexMatching.java b/DynamicProgramming/RegexMatching.java index 2b89b5c602d6..e8b54a61d2c8 100644 --- a/DynamicProgramming/RegexMatching.java +++ b/DynamicProgramming/RegexMatching.java @@ -9,7 +9,7 @@ **/ /** - * For calculation Time and Space Complexity. Let N be length of src and M be length of pat + * For calculation ofTime and Space Complexity. Let N be length of src and M be length of pat **/ public class RegexMatching { @@ -168,4 +168,4 @@ public static void main(String[] args) { } // Memoization vs Tabulation : https://www.geeksforgeeks.org/tabulation-vs-memoization/ -// Question Link : https://practice.geeksforgeeks.org/problems/wildcard-pattern-matching/1 \ No newline at end of file +// Question Link : https://practice.geeksforgeeks.org/problems/wildcard-pattern-matching/1 diff --git a/Sorts/BitonicSort.java b/Sorts/BitonicSort.java index 4888cc070c6f..e75ef118a377 100644 --- a/Sorts/BitonicSort.java +++ b/Sorts/BitonicSort.java @@ -44,7 +44,7 @@ void bitonicSort(int a[], int low, int cnt, int dir) { // sort in descending order since dir here is 0 bitonicSort(a, low + k, k, 0); - // Will merge wole sequence in ascending order + // Will merge whole sequence in ascending order // since dir=1. bitonicMerge(a, low, cnt, dir); } diff --git a/Sorts/PancakeSort.java b/Sorts/PancakeSort.java index f679b37226ad..89ad495eb13c 100644 --- a/Sorts/PancakeSort.java +++ b/Sorts/PancakeSort.java @@ -3,7 +3,7 @@ import static Sorts.SortUtils.*; /** - * Implementation of gnome sort + * Implementation of pancake sort * * @author Podshivalov Nikita (https://github.com/nikitap492) * @since 2018-04-10 From d4a0f0d212aa617f28997f43e932d0b7c37522bf Mon Sep 17 00:00:00 2001 From: Manan-Rathi Date: Sun, 3 Oct 2021 21:48:50 +0530 Subject: [PATCH 2/2] Fix typos in comments --- DynamicProgramming/RegexMatching.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DynamicProgramming/RegexMatching.java b/DynamicProgramming/RegexMatching.java index e8b54a61d2c8..724e53886f4c 100644 --- a/DynamicProgramming/RegexMatching.java +++ b/DynamicProgramming/RegexMatching.java @@ -9,7 +9,7 @@ **/ /** - * For calculation ofTime and Space Complexity. Let N be length of src and M be length of pat + * For calculation of Time and Space Complexity. Let N be length of src and M be length of pat **/ public class RegexMatching {