# Tagged Questions

14 views

### Print the longest common sequence [migrated]

I am trying to implement solution of the classical problem, but I am confused as I get some cases where I don't find good results. Output: "The Longest common sequence", "Length" def ...
377 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 ...
90 views

### Does the head of any linked list must contain any data [closed]

Is there any rule that says the head of any linked list should contain data. Is it because by doing it so we save a space for one node. Why for some implementation of head contains data and for other ...
116 views

### Efficient “Object with weights” structure

I need to find an "efficient" data structure / set of algorithms to do the following things: I have a list of objects. I need to assign them weights and later on increase or decrease these weights. ...
41 views

### I have an unordered list of rectangles and their neighbors on four sides with no origin. How can I efficiently convert this into a grid?

I am writing a GtkGrid-like container for my GUI library for Go, and I'm trying to write the actual layout part of the code. Basically, I have an unordered list of controls. Each control is a ...
62 views

### How to chain together points in an array

I have a series of points with lengths and rotations like this: I need to create separate chains from points whose lines overlap but I’m having real trouble doing this efficiently. I have an array ...
132 views

### Tournament bracket method to put distance between teammates

I am using a proper binary tree to simulate a tournament bracket. It's preferred any competitors in the bracket that are teammates don't meet each other until the later rounds. What is an efficient ...
115 views

### High-level strategy for distinguishing a regular string from invalid JSON (ie. JSON-like string detection)

Disclaimer On Absence of Code: I have no code to post because I haven't started writing; was looking for more theoretical guidance as I doubt I'll have trouble coding it but am pretty befuddled on ...
252 views

### Exercise 3.6: Skiena Algorithm Design Manual

I am preparing for interview and try to solve the exercise problems of the book. 3-6. [5] Describe how to modify any balanced tree data structure such that search, insert, delete, minimum, and ...
1k views

### What is the relationship between data structures and algorithms? [closed]

I have been searching for a good online course in data structures but have found that Google also returns results for algorithms courses, which say stuff like: In this course you will learn ...
193 views

### Does implementing algorithms improve your programming skills? [duplicate]

I have been self studying algorithms and data structures for some time now and currently enjoying it. Whenever I understand an algorithm, I usually try to code them from scratch for fun and I always ...
226 views

### Find possible variations of one item out of multiple baskets.

I have three baskets of balls and each of them has 10 balls which have the following numbers: Basket 1: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Basket 2: 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ...
261 views

### Is there already a “Binder” data-structure?

I was thinking of a data structure that I cannot describe better than with the word "book", or more exactly "binder". I was wondering if this had already been implemented in libraries like Boost or ...
98 views

### Implementation/Representation of Symmetries in Chessboards

In a 8X8 chessboard, I was wondering how to implement the symmetry of the board. A lot of positions are just mirrors or rotations of one another (with no pawns or castling capabilities left the ...
124 views

### Bloom filters or similar, but with no false positive

To improve some lookups, I am considering the use of Bloom Filters. But in my use-case, the most probable outcome is that the element do exists in the target set. Bloom filters can have false ...
43 views

### Designing online exam [duplicate]

I need to design an online exam server for an exam like GRE in which question difficulty increases if you answer correctly and decreases if you answer wrong. Questions are multiple choice ...
178 views

### Designing online exam

I need to design an online exam server for an exam like GRE in which question difficulty increases if you answer correctly and decreases if you answer wrong. Questions are multiple choice ...
335 views

### Approximately how much is solid and broad knowledge of data structures and algorithms worth in the employment market? [closed]

I'm wondering how much I can boost my salary if I was to gain a strong and broad understanding of data structures and algorithms. I know the real basis but there are so many data-structures out there ...
2k views

### Why are algorithms and data structures important? [duplicate]

It seems like a lot of university-level computer science programs and programmer job interviews focus heavily on algorithms and data structures. I'm curious as to why universities and employers put so ...
2k views

### What do I need to know about Data Structures and Algorithms in the “real” world [closed]

I just finished the data structures and algorithms course in school , I took it during the summer so 6wks course vs a 16 wk course during the regular semester. So not only was the course hard but it ...
75 views

### Store a tree with near next neighbours

I would to find an efficient structure (speed and volume) to store nodes and their neighbourhood. My input is build out of stings in the following format ./X/Y.log where X ∈ [0,359] and Y ...
568 views

### Where to learn graph theory applications [closed]

I am completely new to designing algorithms with graphs. I am following CLRS and other video lectures in Youtube, notably from IIT/MIT. They are pretty good, and I currently have decent idea about ...
789 views

I need a little help understanding the implementation of radix exchange sort algorithm. Radix exchange (I don't know if it's the exact name in english based literature) is a lot similar to quicksort, ...
350 views

### Priority queue for Kruskal's algorithm with running time O(E lg V)

I'm reviewing my notes on Kruskal's algorithm and have a question about getting the runtime down to O(E lg V). By using a PQ with edges and a boolean array of which vertices we have added to our tree ...
292 views

### What data structure is suitable for implementing dynamic huffman encoding and decoding on a piece of text?

Some pseudo code or resources will be appreciated.I was thinking if implementing it in form of a BST stored in an array. However,not all operations can be performed easily using this approach. I am ...
131 views

### Algorithm/Strategy or Data structure to capture priorities sub priorities in an app

I am working on a CMS that is starting to evolve a bit. We started off with content that had the following priorities ( columnn in the db on the content table): HIGH MED LOW. Data was fetched by ...
265 views

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?
124 views

### overworld vs on-screen 2d tile organization

I am developing a 2d game where the world is made up of tiles. I have an overworld and a "current world": the current world represent the current tiles on screen at any given time, currently this ...
204 views

### Data structure for fast StartsWith filtering of a dictionary

I have a list of english words. I'm trying to come up with a data structure that allows me to do fast StartsWith filtering, like: var words = dictionary.StartsWith("foo"); I was thinking of ...
473 views

### Algorithms for data structures in distributed system

The hash table data structure can be easily spread across multiple machines with a simple algorithm to distribute the keys: machine_to_query = item_key % machine_count When you want to read and ...
2k views

### What are the differences between algorithms using data structures and algorithms using databases?

The General Question What are the differences between algorithms using data structures and algorithms using databases? Some Context This is a question that has been bugging me for some time, and I ...
764 views

### How do I express subtle relationships in my data?

"A" is related to "B" and "C". How do I show that "B" and "C" might, by this context, be related as well? Example: Here are a few headlines about a recent Broadway play: David Mamet's Glengarry ...
7k views

### When to use DAG (Directed Acyclic Graph) in programming?

I recently found a framework named ecto. In this framework, a basic component named "plasm", which is the ecto Directed Acyclic Graph.In ecto, plasm can be operated by ecto scheduler. I am ...
1k views

### What is the usage of Splay Trees in the real world?

I decided to learn about balanced search trees, so I picked 2-3-4 and splay trees. What are the examples of splay trees usage in the real world? In this Cornell: ...
751 views

### Efficient Data Structure for holding a graph

Problem Link - http://opc.iarcs.org.in/index.php/problems/NUMTRIPLE In my opinion, the problem can be solved by a data structure, that shows how each number is connected to another, and via recursion ...
406 views

### Amazon Kindle - Whispersync implementation?

For those who are not aware of Kindle's whispersync, here is how it works (from amazon.com): "...Whispersync synchronizes the bookmarks and furthest page read among devices registered to the same ...
5k views

### Generic Adjacency List Graph implementation

I am trying to come up with a decent Adjacency List graph implementation so I can start tooling around with all kinds of graph problems and algorithms like traveling salesman and other problems... ...
1k views

### Learning basic algorithms - better C or C++? [closed]

I'm studying fundamental algorithms (quicksort, mergesort, binary trees, etc..) and I'm going to re-code every algorithm by scratch to learn how they work. Should I code them in C or C++? I think with ...
388 views

### Is there any better approach to shortest path finding within a (vehicular) traffic network?

Dear fellow programmers, We're developing software which simulates vehicular traffic. Part of the process called "assignment" is concerned with assigning vehicles to their routes and has to use some ...
2k 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? ...
2k views

### Amortized Analysis? (Worst-case Performance Guarantees)

What is Amortized Analysis? And how can it help me achieve worst-case performance guarantees in my programs? I was reading that the following techniques can help the programmer achieve Worst-case ...
650 views

### Nearest color algorithm using Hex Triplet

Following page list colors with names http://en.wikipedia.org/wiki/List_of_colors. For example #5D8AA8 Hex Triplet is "Air Force Blue". This information will be stored in a databse table (tbl_Color ...
1k views

### Strategy/algorithm to divide pot to chips

I want to split poker pot to chips. Example: Pot = \$17.500. I have the endless piles of chips. I have the following types of chips: ChipsTypes = [\$1, \$5, \$10, \$25, \$100, \$500, \$1.000, \$5.000, ...
6k views

### Which algorithms/data structures should I “recognize” and know by name? [closed]

I'd like to consider myself a fairly experienced programmer. I've been programming for over 5 years now. My weak point though is terminology. I'm self-taught, so while I know how to program, I don't ...
638 views

### finding houses within a radius

During an interview I was asked given the following: A real estate application that lists all houses that are currently on the market (i.e., for sale) within a given distance (say for example the user ...
210 views

### Logic required to solve a problem relating to location of objects

I have raised a question on dba.stackexchange.com but as the heart of my question is in fact to do with logic I have raised a more general representation of my issue here. I think it is the right ...
754 views

### What is the Bible of Hashing?

Is there a Cormen-like reference on Hashes and Hashing? This particular structure has seen little attention in my CS education for some reason but I'd like to learn more as they seem to be everywhere. ...
947 views

### Keeping binary search tree balanced

I am educating myself on algorithms and data structures. For that, I am doing a simple program that would read lines like this: bdhj 168.24 dahf 42.88 dhfa 128.92 First column represents an account ...