This project demonstrates how to convert a singly linked list into a doubly linked list in Java.
It also provides methods to print the list in both forward and reverse directions.
- Add elements to a singly linked list.
- Convert the singly linked list into a doubly linked list.
- Print the list in normal order.
- Print the list in reverse order after conversion.
- The
ekle(int veri)method adds new nodes to the singly linked list. - The
ciftYonList()method converts the list into a doubly linked list. - The
yazdir()method prints the list in the forward direction. - The
tersYazdir()method prints the list in reverse.
This project is a Java program that checks whether a given word is a palindrome or not.
A palindrome is a word that reads the same forward and backward (e.g., "radar", "kayak", "level").
- Takes user input for a word.
- Reverses the word using a stack.
- Compares the original and reversed word to determine if it is a palindrome.
- Displays the result on the screen.
- A Stack (LIFO - Last In, First Out) is used to reverse the word.
- StringBuilder is used to construct the reversed word.
- The program asks the user to enter a word.
- The word is pushed into a Stack character by character.
- The word is reversed using Stack operations.
- The original word is compared with the reversed word.
- If they match, the word is a palindrome; otherwise, it is not a palindrome.
Compile and run the program in any Java environment: