I´ve been trying to read several csv files (arround 20 MB) using openCSV, but so far it has been slow. Im trying to read 4 csv files which I´m loadi
I am currently studying about Algorithms & Data Structures and while I was reading over the Book of Algorithms 4th edition, I discovered the Bag data-struct
I was working on a problem where you have to square the numbers in a sorted array on leetcode. Here is the original problem Given an array of integers A sor
In an article about linked list, it is said that accessing a random element is not allowed and to access a certain node we need to traverse it from the head nod
I came across this problem in a practice interview. I don't want a direct answer, just some help with the intuition of the problem, both your brute force thinki
A disjoint set with only path compression implemented is like this: // In cpp. int Find(int x) { return f[x] == x ? x : f[x] = Find(f[x]); } int Union(int a, i
I recently had my Amazon interview for SDE. I was asked to design a stack which does push, pop and min in O(1). I got the logic and implemented the push of the
An undirected graph having 'n' number of edges, then find out number of vertices that graph have?
Given a undirected graph that it has ordinary edges and specific edges, our goal is to find the sum of the shortest path's weight between two vertices(start ve
I want iterate over items's data and create a a new list of SomeData based on item.type however when type is UNKNOWN I need skip that element and not add to lis
I'm working on a project with 6 huge mapping tsv files. In most cases they look like this: First: ID which is a unique String which starts with a char and goes
I am getting 500k records per request from the Database then mapping the data to a list of POJO classes then writing the records to an excel sheet (I have the r
Okay, so in-order traversal of threaded binary tree by using threads goes something like this: Start at leftmost node and print it Follow thread to right and
An evil scientist has developed an injection that induces insatiable hunger in a fish. On giving this injection, a fish of size x can eat another fish of smalle
I have this question that is medium level and couldn't even think on how to solve this problem, my solution could be overkill as I have no idea on how to traver
I just started to learn data structure and getting an error when executing malloc(): memory corruption (fast) what can be the issue and how to resolve it? I h
This question is about the Bloomier filter, which is not the same as a standard Bloom filter. I'm learning about the Bloomier filter and I don't see the advanta
I have been following a tutorial at cplusplus.com/doc/tutorial. Near the end of the Functions page, it discussed prototyping a function. Later on, I read about
i have the following structure typedef struct { char data1[10]; char data2[10]; AnotherStruct stData; }MyData; for some reason the imple
According to these: http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html Difference between HashMap, LinkedHashMap and TreeMap java beginner : How k