# Remove Minimum number from a list without min() or pop()

My problem is: Write a function def remove_minimum(values) that returns the list resulting from removing the minimum value from a given list without using the min() function nor the pop() function. Do not print the list. I have a code that sorts and reverses the list but I cannot figure out how to remove the… Read More Remove Minimum number from a list without min() or pop()

# List Comprehension Format for Dictionaries

I have a dictionary that has three categories for my customers, and there are multiple customers under each category: ddd = {‘category 1:’: {‘A’: 50.5, ‘B’: 28.9, ‘C’: 46.3, ‘D’: 513.8}, ‘category 2:’: {‘E’: 20.5, ‘C’: 48.1}, ‘category 3:’: {‘D’: 28.2, ‘F’: 68.3}} The number in each sub-dictionary represents the dollar amount they paid. Therefore,… Read More List Comprehension Format for Dictionaries

# How to search with the Contains method in a List if there are multiple columns of data?

Good afternoon, there is a List with several columns of data, here is an example public static List<(double date, double profit)> data_good_proffit = new List<(double date, double profit)>(); how to write to search using the Contains method in the Profit column? data_good_proffit.Contains(); so writes an error >Solution : Contain will do if you want to… Read More How to search with the Contains method in a List if there are multiple columns of data?

# Dynamic Programming on Trees

A city has N buildings, connected by streets that form a tree. We want to light all streets in the city. This can be done by placing a light at any building. When a light is at building B, all streets out of B are lighted. Your task is to light the city using the… Read More Dynamic Programming on Trees

# Are there any Computational problem with ϴ(logn)^2 algorithm?

Are there any real computaional problems which can be solved by time complexity of log(n) * log(n)? This is different from finding smallest element in sorted matrix, which is log(n)+log(n) or 2log(n). There are can be some kind of pattern printing algorithm which can be made as ϴ(logn)^2 but I’m not sure if they are… Read More Are there any Computational problem with ϴ(logn)^2 algorithm?

# Cannot compare results of a method to a "T" key java

import java.util.*; public class Searcher<T> { // Returns the index of the key in the sorted array, or -1 if the // key is not found. public static <T> int binarySearch(T[] array, int arraySize, T key, Comparator<T> comparer) { int lowBound = 0; int highBound = arraySize – 1; int mid = 0; //string this.key… Read More Cannot compare results of a method to a "T" key java

# How can I get These Rows of checkboxes to line up?

I am trying to make a checklist out of checkboxes in a grid-like format, but am having trouble getting the top row of checkboxes, which are the only ones with labels, to line up with the rest. It looks like the checkboxes up top are spaced apart based on their label length, so I think… Read More How can I get These Rows of checkboxes to line up?

# numpy.ndarray object's name only converted to a string

If I wish to get the name of a numpy.ndarray converted to a string (but not the content of the numpy.ndarray, just the name only), how do I do that? I tried str(npndarrayName) and npndarrayName.tostring() but both are converting the content and not the name itself only. >Solution : I am not sure if I… Read More numpy.ndarray object's name only converted to a string

# while I'm getting infinite while loop in java

I want to write a code which loops in a 2d array, the main method is findVal which gets a 2d array and a value and return true if the value is in the array, I used a binary search code to loop through a single row of the array and another method which goes… Read More while I'm getting infinite while loop in java

# Two 2d Arrays Sum

I’m trying to take two 2d array inputs, and then add them together, but it won’t compile correctly. For some reason if i declare the ‘addedMatrix’ outside of the method the code compiles but the addedMatrix is blank Heres what I have so far : System.out.print("Enter Matrix 1 : "); double[][] matrix1 = new double[3][3];… Read More Two 2d Arrays Sum