This code takes the no. of nodes in a graph and creates the graph with the number of nodes and then the user has to input the one-way edges between two vertices.(The formed Graph is a Directed Acyclic …

This code takes the no. of nodes in a graph and creates the graph with the number of nodes and then the user has to input the one-way edges between two vertices.(The formed Graph is a Directed Acyclic …

Problem:You will be given two arrays of integers and asked to determine all integers that satisfy the following two conditions: The elements of the first array are all factors of the integer being …

How to sort a list of strings based on order mentioned in static map having item of list as key. List={“AU”,”I”,”U”, “O”, “A1”} Need to sort the above list of string using the below map which has …

My task is to change the values of nodes to their heights in a binary tree. By the condition of the task, you need to change all the values in 1 pass of the tree, but you can violate this condition …

i am trying to detect a jokerStraightFlush when analysing a poker hand. I need to add a feature where this hand works 8S JK 6S JK 4S. The JK are jokers. I am using the exact same code logic as https://…

I have an array of numbers, now I want to make this as increasing sequence by adding a fixed number b. I want to find how many times the fixed number b is added to make my array as increasing sequence….

So im following along this playlist about data structures and in this video to conclude the linked list part, the professor explain we need an inner class called IteratorHelper. Video: https://www….

An array of N words is given. Each word consists of small letters (‘a’- ‘z’). Our goal is to concatenate the words in such a say as to obtain a single word with the longest possible sub-string …

I’m solving Codility questions as practice and couldn’t answer one of the questions. I found the answer on the Internet but I don’t get how this algorithm works. Could someone walk me through it step-…

The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the following sequence (ie, for n = 3 ) : “123” “132” “213” “231” “…