×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner
Parth Maniyar

Parth Maniyar

Competitive Programmer | Intern at OpenGenus | Bachelor of Technology (2017 to 2021) in Information Technology at Ahmedabad University

Rajkot, Gujarat, India •
11 posts •
Software Engineering

Using wrapper classes in Java

A Wrapper class is a class whose object contains a primitive data types. We can think this as a primitive data type with an additional layer which enables it is get benefits of a custom user defined objects in Java.

Parth Maniyar Parth Maniyar
Problems on Binary Tree

Largest Independent Set in Binary Tree

In this article, we solve the Largest Independent Set in Binary Tree problem using Dynamic Programming and use an augmented binary tree to achieve this.

Parth Maniyar Parth Maniyar
Algorithms

Minimum Cost for Triangulation of a Convex Polygon

We find the Minimum Cost for Triangulation of a Convex Polygon using a dynamic programming approach in O(N^2) space and O(N^3) time complexity.

Parth Maniyar Parth Maniyar
Problems on Binary Tree

Sum of k smallest elements in Binary Search Tree

Given a binary search tree and a integer k our task is to find out sum of all the elements which is less or equal to the k th smallest element

Parth Maniyar Parth Maniyar
Problems on Binary Tree

Find k-th smallest element in Binary Search Tree

Given root of the tree and k as input, output K th smallest element. We reduce the time complexity from O(N) to O(log N).

Parth Maniyar Parth Maniyar
Problems on Binary Tree

Algorithm to convert Binary Search Tree into Balanced Binary Search Tree

In this article, we will explore an algorithm to convert a Binary Search Tree (BST) into a Balanced Binary Search Tree in linear time O(N).

Parth Maniyar Parth Maniyar
Problems on Binary Tree

Algorithm for finding minimum or maximum element in Binary Search Tree【O(log V) / O(V)】

Binary Search Tree is a node-based binary tree data structure and finding the maximum or minimum element take O(log N) in average and can take O(N) in the worst case to O(1) in the best case.

Parth Maniyar Parth Maniyar
Problems on Binary Tree

Understand everything about Binary Search Tree

Binary search tree is a data structure that quickly allows us to maintain a sorted list of numbers in a tree data structure. It can be used to search for the presence of a number in O(log(n)) time and a simple traversal gives the numbers in sorted order.

Vaibhav Gupta
Problems on Binary Tree

Algorithm for finding the minimum number of swaps required to convert a binary tree to binary search tree

We developed an algorithm for finding the minimum number of swaps required to convert a binary tree to binary search tree. The Idea is do the inorder traversal of binary tree and store it in an array.Then find the minimum number of swaps require to sort an array which is the output we want.

Parth Maniyar Parth Maniyar
Algorithms

Find and print all the paths between two vertices in a graph【O((2^V)*(V+E))】

Given a directed graph, a vertex ‘v1’ and a vertex ‘v2’, print all paths from given ‘v1’ to ‘v2’. The idea is to do Depth First Traversal of given directed graph. Start the traversal from v1. Keep storing the visited vertices in an array say path[]. If we reach the vertex v2, pathExist becomes true

Parth Maniyar Parth Maniyar
Algorithms

Find Mother Vertex in a Graph【O(V+E)】

mother vertex in a graph is a vertex from which we can reach all the nodes in the graph through directed path. If there exist mother vertex (or vertices), then one of the mother vertices is the last finished vertex in DFS. (Or a mother vertex has the maximum finish time in DFS traversal).

Parth Maniyar Parth Maniyar
OpenGenus IQ © 2025 All rights reserved ™
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship