Category "arrays"

Converting an array into a linked list in Golang

definition of linked list: type ListNode struct { Val int Next *ListNode } insert helper that does the pointer manipulation: I am aware that root.Val

List.Remove All not removing the negative numbers from textfile

Here's what I want this code to do. Read the textfile random.txt into a List For each line of the textfile read into the list I want to determine if it is posit

How to split a readLine but dont split values inside apostrophes?

Example txt file ADD 'Cordless Screwdriver' 30 1 2 COST 'Multi Bit Ratcheting' FIND 'Thermostat' FIND 'Hand Truck' SELL 'Hammer' 1 QUANTITY 'Paint Can' FIRE 'Jo

How to change the final array to the front in JavaScript?

The case is: function trocaPrimeiroEUltimo(array) { array.array[0] array.array[array.length - 1] return array } I did this way, but it didn't work.

I am trying to take the contents of fa plain txt file and put it into a char array, then I would like to print it out of the array

#include <stdio.h> #include <fstream> #include <string> #include <iostream> #include <cstdlib> using namespace std; int

How can I transform rows to columns? [duplicate]

I have this table with data below and need help because I don't know which formula can I use to convert the table into the desired one. I don'

Extract value from array in Spark

I am trying to extract a value from an array in SparkSQL, but getting the error below: Example column customer_details {"original_customer_id":"ch_382820","fi

How do you populate a google sheets/excel column with cells from a column in another sheet in the same document?

I have a google sheets document that has a main sheet which will have columns x y and z and subsequent sheets 1, 2, and 3 that will each also have columns x y a

trying to figure these project errors

I'm stuck in my project, tried about anything, but can't solve this, getting errors, and testers are not working as well. airport class is the one making troubl

Initializing an array agent attribute from a database

I'm generating agents where two attributes (Modules and Passed_Modules) are arrays. I would like to draw their values from a database reference in the same way

In C, I'm having trouble getting an Index sorted High to Low and vice versa

I'm working on a project involving a preset array: primaryArray[8] = {8, 4, 2, 16, 32, 124, 64, 256}; Im calling a function before the main, its not quite worki

How to transform a list to an array in kotlin

I have a list val rewardList: List<Reward> class Reward( val nameBefore: String
 val amountBefore: Long ) I want to have val rewardArra

How to Add Multiple JSON_BUILD_OBJECT entries to a JSON_AGG

I am using PostgreSQL 9.4 and I have a requirement to have an 'addresses' array which contains closed JSON objects for different types of address (residential a

What's the right way to send a multi dimensional array from a python script to a C++ code using NamedPipes?

I have a C++ code that expects a struct with this exact formate to be send to it through a NamedPipe:- struct InputData { const std::array<std::array<fl

What's the right way to send a multi dimensional array from a python script to a C++ code using NamedPipes?

I have a C++ code that expects a struct with this exact formate to be send to it through a NamedPipe:- struct InputData { const std::array<std::array<fl

How can I create a two dimensional array with each element being a list in Java?

I want to create a two-dimensional array, each element of which is a list, as in the image. I tried ArrayList<List<User>>[][] arrayList = new ArrayL

Writing array with pywin32 to excel

I am trying to write an array into Excel. The code snippet is below. import win32com.client as win32 import sys import numpy as np #-------------- if name=="ma

Create rectangle from given words by some rules

i got this task to make, but i am completely lost. I don't know how to make this... Could you please give me some ideas? I started making it and only thing i ma

How to populate array of arrays in react state variable?

I'm trying to add an array to an array of arrays every function run. How can I append the array to my array of arrays state variable? Here is my code: const [vo

array of objects with 6 keys, how to group them into fewer keys?

sorry if the title is a bit missleading, I new to js so idk how to explain what I want to do properly so I'm gonna show my code and what I expect instead. so I