Welcome to the DSA Programs in Java repository! This collection is designed to help beginners and advanced learners practice and master data structures and algorithms (DSA) using Java. Whether you're preparing for coding interviews or looking to strengthen your problem-solving skills, this repository has something for everyone.
This repository contains a comprehensive collection of DSA programs categorized into three levels: Beginner, Intermediate, and Advanced. Each program includes detailed comments and explanations to help you understand the concepts and logic.
To get started with the programs, follow these steps:
- Clone the repository:
git clone https://github.com/ADITYAPIMPALE11127/dsa-java-programs.git cd dsa-java-programs
- Open the project in your preferred IDE (e.g., IntelliJ IDEA, Eclipse, VS Code).
- Navigate through the programs and start exploring the concepts.
- PrimitiveDatatypes.java: Demonstrates the use of primitive data types in Java.
- NonPrimitiveDataTypes.java: Demonstrates the use of non-primitive data types in Java.
- array.java: Basic array operations.
- arrayQ1.java: Example of an array problem.
- arraysDef2.java: Another array example.
- asciiToArray.java: Converts ASCII values to an array.
- evenOdd.java: Checks if a number is even or odd.
- factorial.java: Calculates the factorial of a number.
- fibonacciSeries.java: Generates the Fibonacci series.
- ifelsePrint.java: Prints strings based on if-else conditions.
- operators.java: Demonstrates the use of operators in Java.
- printFriendsNames.java: Prints a list of friends' names.
- temperature.java: Converts temperature between Celsius and Fahrenheit.
- userInput.java: Takes user input.
- votingEligible.java: Checks if a user is eligible to vote.
- vowelChecker.java: Checks if a character is a vowel.
- CharisVowelOrConsonant.java: Checks if a character is a vowel or consonant.
- primeNumber.java: Checks if a number is prime.
- LeapYear.java: Checks if a year is a leap year.
- NumPositiveOrNegOrZero.java: Checks if a number is positive, negative, or zero.
- TriangleOrNot.java: Checks if three sides can form a triangle.
- concatanateString.java: Concatenates two strings.
- Swapwithout.java: Swaps two numbers without a third variable.
- SumofaNumber.java: Adds the digits of a given number.
- RightAngledTriangle.java: Prints Right angled triangle in star pattern.
- sqaurePattern.java: Prints square shaped star pattern.
- InvertedRightAngledTriangle.java: Prints Inverted Right angled triangle in star pattern.
- MaxInArray.java: Finds the maximum value in an array.
- SecondMaxInArray.java: Finds the second maximum value in an array.
- SecondMinOfArray.java: Finds the second minimum value in an array.
- SumOfMinMax.java: Calculates the sum of the minimum and maximum values in an array.
- newArrr.java: Example of array manipulation.
- SumOfArray.java: Calculates the sum of all elements in an array.
- Anagram.java: Checks if two strings are anagrams.
- TwoSum.java: Finds two numbers in an array that sum to a target value.
- ThreeSum.java: Finds three numbers in an array that sum to a target value.
- reverseString.java: Reverses a given string.
- MaxSubarrayKadane.java: Finds the maximum sum subarray using Kadane's algorithm.
- Palindrome.java: Checks if a given string is a palindrome.
- ReplaceCharacter.java: Replaces a char at specific target in a string.
We welcome contributions! If you'd like to contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Make your changes.
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/YourFeature
- Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.