Skip to content

UtkarshaKakulte/Data-Structures-and-Algorithm

Repository files navigation

Hash Table Implementation

Overview

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.

Functionality

  • 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.

Usage

  1. Compile the Java file using javac Main.java.
  2. Run the compiled Java program using java Main.
  3. Choose options from the menu to insert, display, or search mobile numbers in the hash table.

Set Operations

Overview

Allows users to manipulate sets, including adding, deleting, displaying elements, and performing set operations like union, intersection, and difference.

Functionality

  • 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.

Binary Search Tree Operations

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.

Overview

Briefly describe what the program does and its main features.

Functionality

  1. Create a tree by level: Allows users to construct a binary search tree by level.
  2. Insert new nodes using array: Inserts new nodes into the BST using an array.
  3. Find number of nodes on the longest path from root: Determines the number of nodes on the longest path from the root.
  4. Find minimum data value in the tree: Finds the minimum data value in the BST.
  5. Swap left and right pointers of each node: Swaps the left and right pointers of each node in the BST.
  6. Search for a value: Searches for a specific value in the BST.
  7. Inorder traversal: Performs an inorder traversal of the BST.
  8. Preorder traversal: Performs a preorder traversal of the BST.
  9. Postorder traversal: Performs a postorder traversal of the BST.
  10. Exit: Exits the program.

License

MIT License

About

Java Programs for Data Structures.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages