how do i find the values of A,B and C in java

given the following values X,Y,Z, such as (0≤X,Y,Z≤10000) with considering the following three equations : a+b+c = X abc = Y a^2 + b^2+ c^2 = Z i need to find values of a, b and c, I wrote …

Give a list of bomb, each mine has 3 numbers, x, y coordinates and explosion range. Find the initial mine that can eventually detonate the most mines

Give a list of mines, each mine contains 3 numbers, x, y coordinates and explosion range . Find the initial mine that can eventually detonate the most mines and maximum number of mine it denotes. the …

How do I write a Drake sort algorithm for sorting an array in Java? [closed]

I’m writing a Drake Sort Algorithm in java that will sort a collection of elements. The algorithm is supposed to work like this: An array for example: { -2, 4, 1, 4 } Get the max value of the array …

Experimental Analysis of an Algorithm – How to prove that the graph is O(nlogn)?

This question is probably stupid, but I’ve been trying to figure this out for hours and I still couldn’t find anything about it. Probably I’m just too lost. So basically, I’m analysing an algorithm by …

Hacker Rank Frequency Queries [closed]

I am doing the Hacker Rank Frequency Queries question and all my test cases pass but one for Time limit exceeded. What can I do to make my program more efficient. static List freqQuery(…

Algorithm to show how far away a value is from another

Disclaimer: This is a very very difficult question about mathematics and algorithms (in my opinion) – so respect to anyone who makes this. I admire you. I would like to evaluate the performance of my …

How treemap handles case of putting key on same index?

I tried out following code: public static void main (String[] args) throws java.lang.Exception { // sorting based on number of dots Map map =new TreeMap((o1, o2) -&…

Linked List – remove duplicates algorithm in C#/Java

I am studying Data Structures and Algorithms in C#/Java. After encountering a solution to the problem of Linked List duplicate removal, I have been struggling to understand it. The solution is the one …

Doubly Linked List QuickSort Implementation Problem

I’ve implemented a classic Doubly Linked List: class Node { protected T data; protected Node next, prev; } class DoublyLinkedList> { …

Number of substrings with unique letters

I have a string, now want to count the minimum number of substrings such that the letters in the substring should occur only once. Example: Input : cycle Output : 2 explanation: Possible substrings …