mo
BAN USERA. What kind of machines are we talking about (Linux to Windows for example)
B. Serializing in one language and deserializing in another will not work (Think Java and .NET)
C. The best way (inefficient ofcourse) is to serialize a stream in XML. That way all objects will get serialized properly and any client can deserialize them.
With that in mind, I would propose the following algorithm:
A. Write out the BST using in-order traversal to an XML file
B. Add attributes to the XML file indicating what traversal is used
C. If security is of concern, add security parameters
Maze falls under a graph G(V, E) problem which can be solved by Adjacency Matrix or Adjacency List. Adjacency Lists are preferred as most graphs are sparse by nature . As for traversing the graph, the important thing to note is that a DFS algorithm is typically solved using a Stack. The stack basically remembers all the visited nodes/vertex so that each node is visited only once.
- mo February 08, 2014A. Keep a maxCount that depends on the underlying implementation of the resource availability such as max allowed connections in an RDBMS.
B. Keep a currentCount that needs to be synchronized across threads when incrementing/decrementing
C. Keep a timeOut in case, connection is not released
D. Keep a Queue for waiting clients in case pool is full, must be synchronized as well for multi-threading
E. High level methods: getConnection, releaseConnection, forceTimeout, Queue operations such as push, pop etc.
Autocomplete can be achieved many different ways. Most common is Ajax on the client side, and an NLP search engine application like Apache Lucene or Solr that does a reverse lookup and returns the matches based on the typed characters. These search engines can be very finely tuned. The rest of the question is not clear.
- mo February 08, 2014If all the data is to be checked and stored for redundancy, use multiple threads to process the incoming data, then push the data on multiple queues. Have a distributed hashtable to check and store newer values and maybe a count (if needed). I agree though it is a really vague question.
- mo February 08, 2014If all the data is to be checked and stored for redundancy, use multiple threads to process the incoming data, then push the data on multiple queues. Have a distributed hashtable to check and store newer values and maybe a count (if needed). I agree though it is a really vague question
- mo February 08, 2014
n.left?
- mo February 20, 2014