Category "arraylist"

Need help on Arraylist quicksort and partition

Instructions: Given a main() that reads user IDs (until -1), complete the quicksort() and partition() methods to sort the IDs in ascending order using the Quic

I was trying to solve "Grid unique path" using Dynamic programming in Java

I am trying to implement a solution for grid unique path using D.P. approach while trying to do so, I don't know why in the middle of execution the value at (0,

How to Initialize 2d ArrayList with 0 in one line

How to Initialize all the element of 2d Array List in Java with 0 in single line of code without using for lop. ArrayList of m rows and n columns. How to initia

Sorting ArrayList<> based on Lattitude and Longitude in Android

I Have a requirement that has ArrayList that contains Latitude and Longitude (randomly).Is there any way so that I can get this list in a optimized way. Google

Dynamic heap implementation with insert O(log n)

I'm trying to implement a Min Heap in Java, but between studying the complexity and the actual implementation, I realized that it is not clear to me how O (log

JavaScript - How do I print an input inside an array? [closed]

I already tried many ways to solve this, but it always returns undefined. What should I do to solve this issue? function printThreeFavoriteCol

Reading Latitude and longitude from CSV file and display in google map after applying filtering to a column

I managed to fetch long and lat values from CSV and loop them to display all values in google map .Now i need to filter column Fuel_Type = "Unleaded 91" how to

Why does my Clear TexBox command makes the rest of my number in the listbox zero?

Every number is zero. Hi, I’m fairly new to VisualStudio and I have this problem in my code: What I have to do, is to fill an array (all the variables hav

What is the fastest way to split Integer into digits?

I do a lot of operations with splitting numbers into separate digits, putting digits in ArrayList and passing this digits one by one to other ArrayList for furt

cannot delete list elements

I am making space invaders in Java. I am trying to get lasers to work but whenever I remove a laser the timer (that the code is in) stops. I don't understand th

How to return ArrayList from intent

I have a code that pass an arraylist to another intent, how can i return the value of updated arraylist back to the main intent ? Array list in main intent code

I have an array of items inside a list from firebase. I want to display those array elements inside my flutter app but I have failed

Inside of my firebase collection (which is a list elements) I have arrays as well. I am failing to display the elements inside the array in my flutter app. Here

Check if one List<String> contains specific string from another list

I have a List<String> emails containing emails, and another List<String> keywords for containing keywords. For each i-th value from keywords, there

How to convert a JSON request into a list of specific format n spring?

I have a request JSON list like this: [ { Id: 0, values: [a, b, c, d] }, { Id: 1, values: [1, 2, 3, 4] }, . . . ] How do I convert this to a lis

How to create a matrix with key and value in java

I have this table with these values I have this code in java import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;

Looping arraylist object from class value into array java

So I'm trying to insert the value from ArrayList specifically for object Days into one array of integer here is the value I iterate into the table I I've try i

creating a class object array inside another object?

I've got these three classes class Totalizavel def retorna (qnt, valor) total = qnt * valor return total end end class Venda < Tota

How do I separate items in an arraylist by character in Java?

I'm working on a game of Go Fish for a school assignment and I need to separate a group of 4 cards in order to keep score. Any help would be greatly appreciated

Task1:Search for people with their social security number. Task 2: Fetch the list of residents based on their gender

I've created an ArrayList of Residents. Each Residents consists of full name, ssn number and gender. I had to sort the elements by ssn number first and then by

Filtering array list

I have a class which I want to use, to filter my array according to driver. Driver is hardcoded just to try and eliminate possibilities of why the code is not w