tagged [algorithm]
.NET Geometry Library
.NET Geometry Library Does anyone know of a good (efficient, nice API, etc.) geometry open source library for .NET? Some of the operations needed: - - `float``double`- - - - - `float``double`- - -
- Modified
- 17 Apr at 20:59
Calculate median in c#
Calculate median in c# I need to write function that will accept array of decimals and it will find the median. Is there a function in the .net Math library?
sorting integers in order lowest to highest java
sorting integers in order lowest to highest java These numbers are stored in the same integer variable. How would I go about sorting the integers in order lowest to highest?
How do I figure out the least number of characters to create a palindrome?
How do I figure out the least number of characters to create a palindrome? Given a string, figure out how many characters minimum are needed to make the word a palindrome. Examples:
How can I generate truly (not pseudo) random numbers with C#?
How can I generate truly (not pseudo) random numbers with C#? I know that the Random class can generate pseudo-random numbers but is there a way to generate truly random numbers?
How to prove that a problem is NP complete?
How to prove that a problem is NP complete? I have problem with scheduling. I need to prove that the problem is NP complete. What can be the methods to prove it NP complete?
- Modified
- 27 Nov at 22:30
Find if point lies on line segment
Find if point lies on line segment I have line segment defined by these two points: and . I have point . How can I check if the point lies on the line segment?
How to implement a queue using two stacks?
How to implement a queue using two stacks? Suppose we have two stacks and no other temporary variable. Is to possible to "construct" a queue data structure using only the two stacks?
- Modified
- 23 Aug at 00:59
Sum of digits in C#
Sum of digits in C# What's the fastest and easiest to read implementation of calculating the sum of digits? I.e. Given the number: 17463 = 1 + 7 + 4 + 6 + 3 = 21
- Modified
- 26 Jan at 06:18
Polynomial time and exponential time
Polynomial time and exponential time Could someone explain the difference between polynomial-time, non-polynomial-time, and exponential-time algorithms? For example, if an algorithm takes O(n^2) time,...
- Modified
- 22 Mar at 16:22
shuffle (rearrange randomly) a List<string>
shuffle (rearrange randomly) a List I need to rearrange my List array, it has a non-determinable number of elements in it. Can somebody give me example of how i do this, thanks
Which is the fastest algorithm to find prime numbers?
Which is the fastest algorithm to find prime numbers? Which is the fastest algorithm to find out prime numbers using C++? I have used sieve's algorithm but I still want it to be faster!
Breadth First Vs Depth First
Breadth First Vs Depth First When Traversing a Tree/Graph what is the difference between Breadth First and Depth first? Any coding or pseudocode examples would be great.
- Modified
- 5 Jun at 17:59
What is Sliding Window Algorithm? Examples?
What is Sliding Window Algorithm? Examples? While solving a geometry problem, I came across an approach called Sliding Window Algorithm. Couldn't really find any study material/details on it. What is ...
- Modified
- 20 Oct at 14:42
Facial recognition/merging software
Facial recognition/merging software Can anyone point me in the right direction of some facial recognition libraries & algorithms ? I've tried searching/googling but i mostly find thesises and very lit...
- Modified
- 16 Feb at 12:34
How do I calculate a point on a circle’s circumference?
How do I calculate a point on a circle’s circumference? How can the following function be implemented in various languages? Calculate the `(x,y)` point on the circumference of a circle, given input va...
- Modified
- 14 Apr at 02:33
How is a random number generated at runtime?
How is a random number generated at runtime? Since computers cannot pick random numbers(can they?) how is this random number actually generated. For example in C# we say, What happens inside?
- Modified
- 14 Dec at 15:29
Shortest code to calculate list min/max in .NET
Shortest code to calculate list min/max in .NET I'd like something like Is there a builtin way to do this in .NET?
Calculate Time Remaining
Calculate Time Remaining What's a good algorithm for determining the remaining time for something to complete? I know how many total lines there are, and how many have completed already, how should I ...
Expand a random range from 1–5 to 1–7
Expand a random range from 1–5 to 1–7 Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.
How do I check if a number is a palindrome?
How do I check if a number is a palindrome? How do I check if a number is a palindrome? Any language. Any algorithm. (except the algorithm of making the number a string and then reversing the string).
- Modified
- 2 Nov at 22:36
Best sorting algorithms for C# / .NET in different scenarios
Best sorting algorithms for C# / .NET in different scenarios What are the best algorithms for sorting data in C#? Is there one sorting algorithm that can handle 80% of sorts well? Please give code ex...
Is there any algorithm in c# to singularize - pluralize a word?
Is there any algorithm in c# to singularize - pluralize a word? Is there any algorithm in c# to singularize - pluralize a word (in english) or does exist a .net library to do this (may be also in diff...
Performing Breadth First Search recursively
Performing Breadth First Search recursively Let's say you wanted to implement a breadth-first search of a binary tree . How would you go about it? Is it possible using only the call-stack as auxiliary...
- Modified
- 1 Nov at 15:32
Examples of Algorithms which has O(1), O(n log n) and O(log n) complexities
Examples of Algorithms which has O(1), O(n log n) and O(log n) complexities What are some algorithms which we use daily that has O(1), O(n log n) and O(log n) complexities?
- Modified
- 2 Jan at 20:20