Provides a basic hash table with functionalities such as insertion, display, and searching of mobile numbers. Implements collision resolution techniques like linear probing and quadratic probing.
- Insertion: Insert mobile numbers into the hash table.
- Display: Display the contents of the hash table.
- Search: Search for mobile numbers in the hash table.
- Collision Resolution: Implement collision resolution using linear probing or quadratic probing.
- Compile the Java file using
javac Main.java
. - Run the compiled Java program using
java Main
. - Choose options from the menu to insert, display, or search mobile numbers in the hash table.
Allows users to manipulate sets, including adding, deleting, displaying elements, and performing set operations like union, intersection, and difference.
- Add Element: Add elements to Set A or Set B.
- Delete Element: Remove elements from Set A or Set B.
- Display Elements: Display the elements in Set A or Set B.
- Search Element: Search for an element in Set A or Set B.
- Size of Set: Retrieve the size of Set A or Set B.
- Union: Compute the union of Set A and Set B.
- Intersection: Compute the intersection of Set A and Set B.
- Difference: Compute the difference between Set A and Set B.
- Subset Check: Determine if Set A is a subset of Set B.
This Java program implements various operations on a binary search tree (BST). It allows users to create a BST by level, insert new nodes using an array, find the number of nodes on the longest path from the root, find the minimum data value in the tree, swap left and right pointers of each node, search for a value, and perform inorder, preorder, and postorder traversals.
Briefly describe what the program does and its main features.
- Create a tree by level: Allows users to construct a binary search tree by level.
- Insert new nodes using array: Inserts new nodes into the BST using an array.
- Find number of nodes on the longest path from root: Determines the number of nodes on the longest path from the root.
- Find minimum data value in the tree: Finds the minimum data value in the BST.
- Swap left and right pointers of each node: Swaps the left and right pointers of each node in the BST.
- Search for a value: Searches for a specific value in the BST.
- Inorder traversal: Performs an inorder traversal of the BST.
- Preorder traversal: Performs a preorder traversal of the BST.
- Postorder traversal: Performs a postorder traversal of the BST.
- Exit: Exits the program.
MIT License