How to check if 4 points form a square?
Assume I have 4 points (they are 2-dimension), which are different from each other, and I want to know whether they form a square. How to do it? (let the process be as simple as possible.)
Container types in Golang
For a non-OOP language like google Go, is it idiomatic to go about implementing new container types using datatypes like arrays or lists so as to implement convenient functionality like contains
method which is absent from all in built container types?
Help with algorithmic complexity in custom merge sort implementation
I’ve got an implementation of the merge sort in C++ using a custom doubly linked list. I’m coming up with a big O complexity of n^2, based on the merge_sort()
> slice
operation. But, from what I’ve read, this algorithm should be n*log(n)
, where the log has a base of two.
Is there an appropriate coding style for implementing an algorithm during an interview? [closed]
Closed 9 years ago.
NLP – Queries using semantic wildcards in full text searching, maybe with Lucene?
Let’s say I have a big corpus (for example in english or an arbitrary language), and I want to perform some semantic search on it. For example I have the query:
Algorithm to optimize grouping
I would like to know if there’s a known algorithm or best practice way to do the following:
algorithm for project euler problem no 18
Problem number 18 from Project Euler’s site is as follows:
Is there a rule of thumb for what a bing map’s zoom setting should be based on how many miles you want to display?
If a map contains pushpins/waypoints that span only a couple of miles, the map should be zoomed way in and show a lot of detail. If the pushpins/waypoints instead cover vast areas, such as hundreds or even thousands of miles, it should be zoomed way out.
How to create Button/Switch-Like Tile where you can step on it and change its value?
If the player steps on a Button-Tile when its true, it becomes false. If the player steps on a Button-Tile when it is false, it becomes true.
Tree vs Graphs in search
When you use graphs vs when to use trees for data structures?