All Questions
12 questions
2
votes
1
answer
2k
views
Do we include output space in space complexity?
For example. I have a function which generates an array with random numbers.
int[] generateNum(int n) {
int[] result = new int[n];
/* Logic to generate random number */
...............
...
4
votes
2
answers
974
views
Small Search Engine Algorithm for Document Word Search
I have to design and implement an algorithm for my university project that searches a given set of documents based on the keywords/query given. Assume that each document contain few sentences and ...
3
votes
5
answers
6k
views
How, why or when would you use your own data structure instead of Collections Framework?
While most of the top IT companies will ask you (during the interview) to solve a problem applying some data structure, is it good if you define your own class for that data structure?
Like if I know ...
0
votes
1
answer
236
views
Alert when size of continuous stream of events exceeds 1000
A friend of mine was recently asked this question in an interview.
Lets say there is a continuous stream of incoming events E1, E2 each with timestamp of entry associated with them. Write a java ...
0
votes
0
answers
132
views
Best datastructure to use
I am using Amazon's dynamodb nosql database and as a result I need to think of some ways to do certain operations to fit into their limits (e.g 4k item limit, can't combine small items into the same ...
6
votes
1
answer
1k
views
Detecting surface faces of a huge 3D mesh/grid
I've written a module in my application that creates a mesh from existing coordinate and face data. The number of vertices in the mesh could easily exceed 10 million and the same goes for the faces.
...
0
votes
1
answer
5k
views
I need a data structure for a card game
I am programming a card game in java, and unsure what data structure I should use for the player's hand.
I considered using an array, with one integer to traverse the array and another integer to ...
2
votes
2
answers
795
views
Non-fixed-size Fenwick Tree implementation
I'm planning to implement a non-fixed-size Fenwick tree. That is, a Fenwick tree that allows interleaving range queries with adding/removing elements.
All implementations and samples I've seen so far ...
1
vote
4
answers
1k
views
How to work around Java's lack of pointers to pointers when working with linked data structures? [closed]
I've learned from a textbook how to implement binary search trees recursively in Java, and am working on implementing them nonrecursively. I've found a simple and elegant way to implement an insert ...
-2
votes
2
answers
390
views
About Artificial Intelligence [closed]
I am interested in starting a career in artificial intelligence.
Can anyone suggest how I could prepare for this?
What languages should I study that would be best for this career choice?
10
votes
4
answers
9k
views
Analyzing Memory Usage: Java vs C++ Negligible?
How does the memory usage of an integer object written in Java compare\contrast with the memory usage of a integer object written in C++? Is the difference negligible? No difference? A big difference? ...
24
votes
4
answers
6k
views
Which algorithms and data structures should a developer absolutely know? [closed]
I want to be a successful enterprise Java developer. With what algorithms and data structures should I be well versed? What books would you recommend to me?
To be a successful Java developer, do I ...