instruction
stringlengths
71
95.1k
How can I optimize the following function? It checks whether two strings have a certain number of similar consecutive characters. As it is now, it is very slow, so how can it be improved in terms of speed/performance: #include <stdio.h> int overlap(char *str, const char *substr, int length); int main(void) { if (...
I am trying to develop a program which will solve any permutation-based puzzle such as 15 puzzle or Rubik's cube, so there will be a follow-up question about class that actually solves puzzle. Here I ask about the class which is essential to this task: Permutation class. class Permutation(object): @staticmethod ...
I've been working on a task: I have two giant strings, both consist of the same characters just scrambled (both consist only capital english letters). The task is to find the lowest possible number of changes you can make to turn the first string in the other one, while 1 change = switching neighbour chars in the strin...
I am writing API in Kotlin - this is my first code in this language. I implemented a very primitive 'player' endpoint. I was wondering if I am doing everything ok (please don't mind the static variables - I will put them in the database later) import org.springframework.http.ResponseEntity import org.springframework.w...
I have written a module for parsing a format used by the Defold game engine, it is essentially the google protobuf format, but with a lot of custom things to support how they handle internal things. I would like to have the whole code reviewed, but seeing that it is fairly big (800 lines) I assume that is a no go? If ...
This is a follow-up from my previous post, which can be found here. A readme for more detailed information can be found here. It is a library to create console based tables where you can insert, remove and update entries. An example could look like this: +---------------+-------------+-----------------+----------------...
On various websites, I've come across a lot of realizations of Newton polynomial interpolation that use separate functions for forward and backward interpolation, respectively. Such solutions seem ugly to me because the functions look pretty much the same. For a single Newton interpolation function, I treat the backwar...
I have posted this in continuation to my earlier post Quadratic equation solver in JavaScript. Tried to improve on the shortcomings last time and also changed the logic. It is still not covering all the input cases. Planning to improve it over time with feedbacks. Recently started learning about Functional Programming ...
This is a program to find solutions to Goldbach's weak conjecture. I've tried to optimise the solution function by never looking at primes that are larger than the remaining sum, but it feels clunky. Any ideas? extern crate primal; use std::env; fn get_input() -> usize { env::args() .nth(1) .expec...
The following Python program generates heat maps of the roots of Littlewood polynomials. It works fine with a small number of roots, however I tried to use 2^21 in the first loop and it ate up 12 gigabytes of RAM on my computer. How can I make the code less memory-intensive while still allowing reasonably fast performa...
EDIT: Thanks everyone for your answers, this is moving quickly now and it's always essential to get better with design and best practice! I am loading in an excel file to a dataset using ExcelDataReader. I then need to create a *.csv file with the data. Currently for the excel sheet I'm working with I have about 40 col...
I have a sequence (in this case actually an array) like this: [| 1; 2; 3; 4; 5; 6; 7; 8; 9; 10|] And want to produce a sequence of pairs like this: [(1, 2); (3, 4); (5, 6); (7, 8); ...] The following code works, but I can't help feeling that it's a lot of code. Is there a shorter, more idiomatic or more elegant way t...
This is an event system implementation for C++. GitHub I'm targeted on following features: RAII-friendly any number of event parameters ability to use member functions, free functions and lambdas as well almost c# like usage Now I'm looking for review, ideas and critique. The current solution for event handlers iden...
I wrote an implementation of circle - line segment collision detection algorithm. Here is quick demonstration how it works: And here is my implementation in Javascript using HTML canvas: index.html <html> <head> <meta charset="utf-8"> </head> <body> <canvas id="canvas" width="600" height="4...
I have a list of strings that represent a path. These are unique, unsorted values that look like this: li = ['1/', '1/2/4/', '1/23/4/', '1/2/', '1/1/3/', '1/2/3/4/', '1/1/', '1/23/', '1/2/3/'] It can also be assumed that every path has a parent, e.g. 1/2/ has parent 1/. The goal is to organise these items in a structu...
Motivation Quite often, I find myself creating types that must be compared memberwise. For example, consider this simple Person: #include <string> struct Person { // Pretend that the falsehoods programmers believe about names are // all actually true. std::string first_name; std::string last_name; ...
This is front end code for a search feature that searches for characters. It uses the users search query to return an array of matching characters, which then gets displayed in a search list for the user to view and select. Please let me know how I can simplify or improve this code. Thanks for your time! //Champ Search...
I face a computation efficiency problem. I have a time series of a non-monotonically drifting variable, that is measurements of objects going through a machine (where the measurement is made) in a production line. The job to do consists of simulating what this time series would yield if there was a correction made to t...
Right now my route is doing the following: Searching for the post by id from the request parameters Check if the user already likes the post If the user likes the post, then increase likeCount and push user_id to the likes array of the current post and vice versa (dec, pull) Adding post id to myLikes array of user and...
The class below takes in a string of genre IDs deserialized from JSON and spits them back out in a format I can actually use. I'm definitely a beginner and would like to better myself, I feel like with this class specifically my lack of Java knowledge really shows. Here is an example of the input the class is receiving...
Why you're here: Today I bring you a simple Stack Machine and a Lot of questions. I am trying to gain a little bit more understanding of pointers, memory management and templates and thought a Stack implementation would be a fun exercise. As such I would love feedback pertaining to those areas, but I am of course open ...
Can anyone help me remove TLE (time limit exceeded) from this? Given integer n and array of string of length n. In each query (q of them) we are given l and r and we need to find LCP in this subsequence. Q and N <= 10^5. The sum of lengths of strings <= 10^5. #include <bits/stdc++.h> using namespace std; typedef lo...
This is my second attempt to make Tic Tac Toe in Python. It's a part of my learning. Tomorrow I'll work on some simple AI and better menu. What do you think about it? What changes do you suggest? Code: class Field: val = " " pos = 0 weight = 0 def __init__(self, n): self.pos = n self.va...
I'm having a bit of a debate at work regarding when to replace numeric literals with variable names. I have a function that reads data from a buffer and after each read, updates the offset so that next time, we read starting at the right offset. function readMessage(data: Buffer, offset: number) { let firstLen = da...
I'm making a Simon game and I made this function to show flashing lights: //a random array representing html divs to change colors game.computerMoves = [green, red, blue, red, green, green , yellow]; function showMoves() { let i = -1; let c = -1; const start = setInterval(function() { if (i >= game.computerMov...
I got this interview question from Pramp. You can find it online through their website: https://www.pramp.com/challenge/15oxrQx6LjtQj9JK9XlA Find The Duplicates Given two sorted arrays arr1 and arr2 of passport numbers, implement a function findDuplicates that returns an array of all passport numbers that are both...
Followup to this question I made a macro that will fill in data in a workbook that has 65 (24 are user filled) columns and can go as long as 1500 rows. The macro can import about 1500 rows and 24 columns full of information (dates, text, numbers) in 7-10 mins. In this revision, I improved it by mainly decreasing the ti...
I'm somewhat new to JavaScript / jQuery. I wrote this "plug-in", and it seems to do what I want. But I know what I've done is a bit clunky and inelegant. The idea is that I have multiple columns of images, each column with a title. When you click on a column title, only that column of images shows. All the other column...
Every month my department has to generate blank upload files (xlsx) for each day of the month. The following code helps this process by copying a template, iterating through the number of days of the current month, and generating a file for each of those days from the template. I found the copy_rename function which he...
For learning purposes I am trying to develop an event-based library/wrapper to communicate with many clients by using epoll. The wrapper was designed with the following criteria in mind: An Object-Oriented design Very error robust - Handling of most socket exceptions Lightweight and compact This code is based on what...
I'm trying to improve my Python, so I'm trying to do coding challenges and getting them reviewed. I would really appreciate if someone can point out how I can make my code cleaner/more pythonic. My min_heap with a 3-value tuple seems a bit messy, but I couldn't think of a better way to do it. Problem: https://leetcode....
I am trying to come up with a monoid type class in C++. Here I am giving a working example of what I have devised so far. #include <utility> #include <vector> #include <iostream> #include <string> #include <type_traits> #include <iterator> #include <algorithm> #include <list> template<typename T, typename BinaryOp> st...
How can I improve this code? I am a beginner learning react. This is a UI for managing banners. Users upload the image for the banner and specify a start date and end date between which the banner should be displayed. This UI gives the user a way to uplod new banners as well as delete them or change the image/dates for...
I wrote a program to convert temperature into different units, where the users have to put a space between temperature and unit: 23 f, 34 c, 45 k using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PracticeSet1 { class Program { ...
I wrote an XML input transformer to ingest data from test directory and essentially store anything into a DB table. I attempted to make this as generic as possible. I'm new to Java and also realize this approach is overly complicated, but really interested to here/read suggestions on my code. Things I Dislike: I have ...
I'm writing an asynchronous TCP server and client for a game in C# and in particular getting sending right is a bit tricky because calling BeginSend() before EndSend() for a previous send has been called must be avoided. Also I possibly have to deal with partial sends - the documentation on BeginSend() and EndSend() is...
I have a very large dictionary that contains key-value pairs where the key is a string and the value a list. All lists have the same lengths. I want to split up the dataset (dictionary) in two based on the values in one of the lists. One of the lists will contain binary values (i.e. 0 or 1). I want to split up the dict...
Two of my colleagues suggested that I not use a C function to return a char pointer. The way to get a char pointer is to pass it to a function and let the function directly operate on the assigned memory. It sounds to me like an obligation rather than a choice. Is there a convention like this in C (I see other function...
Please review my solution to the minesweeper exercise in rust. Taken from this link at exercism. Overall I'd like to know what I can improve when it comes to performance (what if I had a board from 1e99x1e99). Also I would just like some generic pointers on my rust code as it would help me understand rust a bit better ...
I have a requirement to get incremental counts. I am new to Python so please help me. I have tried below: Testword = 'foo boo' letters = 'abcdefghijklmnopqrstuvwxyz' for key in Testword: print key, Testword.count(key) Results : f 1 o 4 o 4 1 b 1 o 4 o 4 I would like to get incremented count output in the same ...
I created our UserStore class to use it with our custom database membership. We use two databases: AMDbContext host the main information for membership thePortalContext website information I want some help and advice on how to improve AMUserStore code public class AMUserStore : IUserStore<ApplicationUser>, ...
I recently came across the following problem on Codewars: Take a Ten Minute Walk You live in the city of Cartesia where all roads are laid out in a perfect grid. You arrived ten minutes too early to an appointment, so you decided to take the opportunity to go for a short walk. The city provides its citizens with ...
I've created a program to read temperature from 4 sensors, get an average and close/open 4 relays according to min/max values. Right now I'm trying to add a 16x2 LCD display to show those temperatures live instead of having to connect the Arduino to the serial bus and I wrote this: // Wire - Version: Latest - Serial bu...
I am new to functional programming. Just now I solved my first "real world" task using Haskell and now I'm wondering whether I got it "right" and what can be improved. The problem arises from tensor calculations (I am a theoretical physicist), where I have the tensor product of \$\frac{n}{2}\$ identical symmetric tenso...
This is my first program. Its a two player noughts and crosses game. I would really appreciate any comments on how to improve my code or make it more efficient. Many Thanks. It is written in Python 3.6. #Noughts and Crosses Game #Grid grid = [0, 1, 2, 3, 4, 5, 6, 7, 8] #Welcome print("Welcome to Noughts and Crosses G...
I have extended a custom list class I have been working on with a Iterator class. I have not used std::iterator as a base class as it will be deprecated in C++17. There is some debate as to whether to use std::iterator_traits as a base class instead. I have decided to create my own from scratch. I provide the full lis...
One of my first serious Python programs, realized Conway's Game of Life in Python. Not sure that get_cell_state and update_table functions are good as they might be. Would be glad to see any improvements or critique. Thank you for reviewing ^^. import time import random import copy import os black_square_symbol = chr...
One day I used to SSH to lots of machines to do some administrative tasks. I constantly used l to list directories just like I do on my own machines. Guess what, that doesn't work. There were no any usable aliases! So I opened a code editor... xssh This script will connect to remote host via ssh and source specified rc...
This is my first game. Everything in the game was created by me during this week - from assets, music and, of course, code. As I am new to Python I have wondered if the design template for this game is well achieved and in what aspects it could improve. The game simply consists of a basket that collects the clothes of ...
My code seems to work fine. However, I feel like it is a bit too long (fraction.cpp). I really want to create simple, readable, and efficient code. Sample Run: Here is the fraction.h file: #ifndef FRACTION_H #define FRACTION_H #include <QString> class Fraction { public: Fraction(); Fraction(int numberator...
I want to update every icon of a JLabel ArrayList, to its own individual icon based off of an outside ArrayList. The outside ArrayList is called _board_, and the JLabel ArrayList is called _tiles_. I want to update every icon to its corresponding item in _board_. How can I do that efficiently? I need it to update every...
My little Python scriptie needs to save a file to the CWD, but sometimes the file already exists. I found this short and clever example to string concatenate a time signature to the name here on SE. But I wanted to make the file name look pretty, import os import fnmatch import re somefiles = [] myfiles = [] root = "....
Unity3D.com recently released a 2-D Tilemap system. It comes with a really basic RandomBrush for painting a random tile from a list of tiles. But the tiles were not being saved between preview and placement. And it was missing some features of a tile map brush as defined by the base class: rotate & flip & flood fill & ...
I'm trying to turn an array of bytes into a C# object. I only the know the type of the object at runtime. Right now, I'm using the JsonConvert.DeserializeObject<T> to do this, but the result is clunky, mostly because I don't know T at compile time. If I knew T at compile time, I could simply do: string json = System.Te...
The requirements are as follows: Create a Flight app service using React that does the following: Login page: When entering username: “user” and password: “password”, the user will be routed to the app page. otherwise - an error message should be presented. Flight list page: Table of flights with the fields: from,​ ...
Preliminaries I have OWON oscilloscope that is able to record waveform in file in three formats: Text format .txt: the first lines are some general information such as peak-to-peak value, period, frequency etc. Remaining lines are waveform points that is space-separated values. Comma-separated-values format .csv: the ...
This is similar to the program in the book Hacking: The Art of Exploitation. It is rewritten to fit my needs. There are two files, takenote and readnote. To write a note simply use takenote with your note as a command line argument: ./takenote "Buy eggs". The note gets added to the file /tmp/notes with User ID (non rea...
I was doing Exercise 1.6 and 1.7 in 'The C Programming Language' by K&R. The questions state: "Verify that the experssion getchar() != EOF is 0 or 1" (Exercise 1.6) and "Write a program to print the value of EOF" (Exercise 1.7) Here is my attempt at trying to do both in one program: #include <stdio.h> int main() { ...
I wrote this piece of code as solution to a problem set that required finding the majority element in a list using divide and conquer in \$ O(n \log n)\$. The majority element is defined as the element with number of repetitions more than half the length of the input list. The stated solution for that problem was to fi...
I am building a Graph class to learn and eventually plan to add Dijkstra's algorithm to this implementation. What do you think of the overall approach? Any feedback on how to improve this? Vertex.java - contains all vertex information public class Vertex { int key; String name; protected Vertex(String nam...
<?php namespace App\Repositories; use App\Contracts\{ CompanyInterface, ImageUploaderInterface }; use App\Models\Company; use Illuminate\Support\Facades\Auth; class CompanyRepository implements CompanyInterface { protected $imageUploaderRepository; public function __construct(ImageUploaderInterface ...
I am a Haskell beginner with a background in C++ and Python. I have been teaching myself Haskell for about half a year on and off and recently I started doing Hackerrank problems to improve my Haskell muscle. Sometimes I found myself struggling with problems that would be solved fairly easily with an imperative languag...
my player has a gun with 3 bullets. If he runs out of ammo the scene should reset itself. I don't want to load the scene again, some components should reset themselves by using an interface. So my observer class keeps track of the bullets and when there is nothing "active" anymore it should reset the scene. When a bull...
I got asked this question during my interview. You can find information about this question here. Pancake Sort Given an array of integers arr: Write a function flip(arr, k) that reverses the order of the first k elements in the array arr. Write a function pancakeSort(arr) that sorts and returns the input array. You ...
I am working on a game written in Kotlin that has a state management system similar to Redux. The state of the game is kept in a single place and is represented as immutable data classes (no logic). State is mutated by executing "commands" which are functions that perform a discrete transform of the state. Every time t...
To prevent an XY problem, I'll first explain the problem I am trying to solve: Problem I am trying to solve I want to send the contents of a MongoDB collection with a size of around 3 million records to a queuing microservice, so that other microservices might subscribe to my topic and read the messages at their conven...
I'm writing a media player in WPF and since movies are playable, subtitles are a must. Here's what it looks like so far: On the left is the settings tab, in the middle is the actual player and on the right is the playlist. I feel like asking 1 big question wont be as beneficial as breaking it down into 3 questions, wh...
The goal of my code is given a string, to separate the integer substrings from those containing solely alphabetical letters, with the individual substrings in a list. For example: Input: 1h15min Output: ["1", "h", "15", "min"] Here is the code: def separate_text(input_text): if not input_text: return None...
This is a continuation of Part 1. In this question I will present you with a single class which is the most crucial component of the whole system, it's responsible for firing notifications whenever a subtitle must be shown or hidden. The notifications are later consumed by a ViewModel which than notifies it's View, but...
I'm new in HTML and CSS, but finally I managed to create something that looks quite nice. Of course I had some problems and I think I resolved all of them, because site looks like I wanted. But I have still some doubts about my CSS and HTML. So I wonder if there is any chance that you can provide me some feedback for m...
I'm currently writing a menu driven program to store the data for a collection of books. So far the program displays a menu, allows the user to add a book, view the list of books, and exit the program. Note that the program allows the user to cancel a book entry by pressing a lowercase 'c' and then the ENTER key. The p...
Updated version from Graph Implementation in Java using adjacency list public class MyGraph { // add vertex name as key, and neighbors as values in set HashMap<String, HashSet<String>> adjList = new HashMap<>(); public void addVertex(String name) { if (adjList.containsKey(name)) { throw...
Challenge from LeetCode: Array Partition I Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as possible. Example 1: Input: [1,4,3,2] Output: 4 Explanation: n is 2, and the max...
I'm trying to implement a solution to the The Odin Project - Project 2: Knight’s Travails in Clojure (Functional Programming) based on the solution posted by benjdelt. I would like to know your opinion about what should I change to make the code clearer and more functional (as in Functional Programming) and how should ...
I've just taken the codility test on finding perfect squares in a range. I thought it was pretty straightforward, but on submitting, I got that a 50% on correctness and 66% on performance. The spec also mentioned that range will be between [-2147483648 ... 2147483647], expected worst-case time complexity is O(sqrt(abs(...
Please excuse my poor styling and/or code. I need this to run faster, but I have little knowledge of how to do that. Here is a bit of an explanation about boggle, however you can find more online. It takes the board as a 1 line input (argv[1]) and a list of words (argv[2]) as a dictionary. My solution is to make a dict...
It seems that one of the more popular game formats is a grid-based one. To that end I thought I'd design a generic game grid class. The generic type is used to represent the value that is displayed in each cell of the grid. For instance, a Console based game might use a char type for the cell value. Whereas, a form ...
I have finished my code for Conway's Game of Life. I am looking for any advice on how to improve it. I am a C++ beginner, so I used only basic libraries. I am accepting all suggestions. /* Author: Stevan Milic Date: April 2018 Class: COSC 1560 Description: Game Of Life */ #include <iostream> #include <cstdlib> // Libr...
I took up a somewhat interesting challenge when I answered this question. The task is to collect the first occurrences of different types of animals from an infinite stream until you've caught them all. The requirements given: POJO Animal enum AnimalType method to get AnimalType from Animal infinite stream of animal...
While trying to learn Python I stumbled upon a question which asks you to write a code that is able to take an input and verify it to see whether it meets the IPv6 Criteria. I wrote the following code: valid_characters = ['A', 'B', 'C', 'D', 'E', 'F', 'a', 'b', 'c', 'd', 'e', 'f', ':', '0', '1', '2', '3', '4', '5', '6...
I wrote PHP script to auto-update offers from provider API in my database. Unfortunately, by performing the following queries in the foreach loop (following the API records), the load is at 99% of the CPU. The script must be activated in cron every 10-15 minutes, but with this load the server is weak. How could I optim...
The following is a (working) excerpt from the Makefile I want to use in web projects. I wanted this Makefile to contain all the necessary code and not rely on other self-written files. Partly, because I'm stubborn, partly because I just want to copy it from project to project. The code uses a simple regexp match to fin...
I have the following code which iterates over all pixels of an image and does some manipulations on two images of the same size. I would like to speed it up and to avoid iterating over the positions in a for loop: import numpy as np import cv2 # Two images of same size image_in = cv2.imread('my_image.png') image_in2 ...
I'm currently rolling a little Float16 implementation. It's minimalistic and can't handle infinity, NaN and will neither work properly with overflows nor with underflows. (That's not the goal btw.) Is there something particular wrong with the following implementation which could lead to major issues? class Float16 { pu...
I'm trying to master testing. I struggle, conceptually, as to what should be tested. Is this Jest / Enzyme test sufficient for this react component? Is is too much? Are there better practices that I should be implementing? Here is my component. import React from 'react'; import PropTypes from 'prop-types'; import ...
I'm a java dev that has started working with Node/Express and mongo. I'm looking to see how I can improve my code, especially in terms of the async jazz as that is still a bit new to me (and I feel like my async usage is a mess). Here is my function, please let me know what I can do to improve, implement best practic...
I have collected large dataset of trajectories in 3D space. Below is the information about dataset- Each trajectory (shape: n x 4) is saved into CSV file with the following header: time, p_x, p_y, p_z The filenames are defined in following way: subject_i_trail_i.csv, where i starts from 1 to 10. Below are first 10 li...
I'm trying to code some intersection codes for Oriented Bounding Boxes (OBBs) and axis-aligned bounding boxes (AABBs). I have the OBB-OBB intersection using the Separating Axis Theorem (SAT) and I'm trying to figure out how can I improve this code to the specific case where I know I'm comparing an OBB with an AABB. Thi...
My code does what I want, which is remove any files from these specific folders. Is there a smoother way to do this? # Test Script to remove any items Remove-Item -Path 'C:\users\test_removal_account\desktop\*.*' -Recurse Remove-Item -Path 'C:\users\test_removal_account\contacts\*.*' -Recurse Remove-Item -Path 'C:\use...
Here is the script that I would like reviewed for the following: Best practices and design pattern usage Correctness in unanticipated cases The script is made to store (IPFS) Interplanetary File System hash objects. If you would like to know more check out https://ipfs.io 3rd party packages: ipfsapi PyPi page gnupg ...
I am carrying out unit testing for my project but i am not sure i am doing it correctly. The example below calculates the difference between 2 time duration's. public void diffTime2() throws Exception { //Calculsates the difference String ExpectedResult = "1:0:0"; String str_time1 = "04 13, 201...
I am new to programming, python and raspberry-pi, but I am keen to learn more. After doing a few basic tutorials I though it might be best to give it a shot and just come up with a task in which I could practice my current skills. I prepared a csv file with morse-code and wrote a little script to access the csv and tr...
Challenge This is my first 'big' project in C++. (Another number-guessing game, yay!) It's a slightly modified version of the learncpp.com quiz I set as a challenge for myself. The original challenge statement reads: Implement a game of hi-lo. First, your program should pick a random integer between 1 and 100. The use...
This is the original code for accessing a service endpoint that returns information about a product. The exported methods of this module each take a single param of "id" and returns a Promise. I've attempted to refactor this code using curry and compose with ramda.js and would like feedback and possibly a better soluti...
I've written a script in python to scrape the link within contact us or about us from few webpages. The challenge here is to prioritize contact us over about us. For example, if any site contains both of them then my scraper should pick the link within contact us. However, if contact us is not present then only the scr...
I am attempting to create a Tic-Tac-Toe game that uses a recursively checks every possible game board, and finds which boards result in a victory for X. (I ultimately plan to turn this into an AI which implements a minimax algorithm to play against a human player.) I am running into issues with the time efficiency of m...
There's a lot of place in my code where I need to do something like this public static void read(DataInputStream stream) throws IOException { try { Object thing = getById(stream.readInt()); } catch(IllegalArgumentException ex) { throw new IOException(ex); // do not throw IllegalArgumentException ...
I've been learning some basics of python for few moths now. My friend, who works as salesman at company which sells hookahs, asked me if a could write a simple app which would help him maintain a Google Sheet which they use as a database of products in stock. You can see an example of this sheet here: SpreadsheetExampl...
I am working with PHP5 (Laravel 5.1), and I couldn't optimize my function, which takes more 4 minutes turning, and fails in the end when I have a huge data (around 6500 rows, but working when i test with around 1000 rows only). Basically, I try to get an array of objects (which contains users with their balances), and ...
First of all, please note that the input (.vcf) file is very large (>60 GB). So I am reading the .vcf files line by line, but since I have to check for duplicate of two columns present in the input vcf file, I extract those two columns from the input file to a text file ("dup_posID.txt") and then check for duplicates, ...