Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged algorithm

0 votes
481 views
1 answer
    I've heard that it's possible to implement binary search over a doubly-linked list in O(n) time. Accessing a random ... be O(n log n) instead? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
505 views
1 answer
    Problem I need to create 32 Bit numbers (signed or unsigned doesn't matter, the highest bit will never be set ... many set bits we need set? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
589 views
1 answer
    How would I write this function? Any examples appreciated function isPointBetweenPoints(currPoint, point1, point2):Boolean { ... I'm stuck } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
723 views
1 answer
    I'm working with some 3d geometry. I need to find the intersection of triangle with another triangle. What algorithm could I use? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
431 views
1 answer
    I know there are ways to construct a tree from pre-order traversal (as an array). The more common question ... tree. Same went for recursion. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
657 views
1 answer
    I just bumped on to this question today and was trying for a solution that is better than O(N) but could not come ... C# Array.find() or LINQ's. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
605 views
1 answer
    This problem is from the 2011 Codesprint (http://csfall11.interviewstreet.com/): One of the basics of Computer ... how this relation is derived! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
412 views
1 answer
    Note: I asked this question before but it was closed as a duplicate, however, I, along with several others believe ... at the ends like this: See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
495 views
1 answer
    You are given an array of integers. You have to output the largest range so that all numbers in the range ... [] arrays should be used. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
463 views
1 answer
    Does the following Quicksort partitioning algorithm result in a stable sort (i.e. does it maintain the relative position of ... ); return i+1; } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
589 views
1 answer
    I was looking through a programming question, when the following question suddenly seemed related. How do you convert a ... in one swap. Thanks! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
522 views
1 answer
    Given [1,2,3,4,5], how can I do something like 1/1, 1/2, 1/3,1/4,1/5, ...., 3/1,3/2,3/3 ... any two points but I don't need a fancy algorithm. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
498 views
1 answer
    I want to design a URL shortener for a particular use case and type of end-user that I have targetted. I ... url. How can I accomplish this? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
502 views
1 answer
    What would be the efficient algorithm to find if two given binary trees are equal - in structure and content? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
827 views
1 answer
    Im looking for some fairly easy (I know polygon union is NOT an easy operation but maybe someone could point me ... still I dont have an idea. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
716 views
1 answer
    The median of five is sometimes used as an exercise in algorithm design and is known to be computable using only 6 ... up to 13 comparisons :] See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
527 views
1 answer
    I know that the history in Git is stored in a data structure called a DAG. I've heard about DFS and know it ... general idea of what's going on. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
582 views
1 answer
    Wikipedia states that the average runtime of quickselect algorithm (Link) is O(n). However, I could not clearly ... average runtime is O(n)? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
540 views
1 answer
    What is the best algorithm to find if any three points are collinear in a set of points say n. Please also ... it is not trivial. Thanks Bala See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
673 views
1 answer
    I have a list of numbers and I want to add up all the different combinations. For example: number as ... calculate this with different numbers? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
515 views
1 answer
    Given an unsorted integer array, and without making any assumptions on the numbers in the array: Is it possible to find ... defined as abs(a-b) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
516 views
1 answer
    I have two line segments: X1,Y1,Z1 - X2,Y2,Z2 And X3,Y3,Z3 - X4,Y4,Z4 I am trying to find the ... go about this, or any sources of furmulae? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
408 views
1 answer
    I think this must be simple but I can't get it right... I have an MxM triangular matrix, the ... Does anyone know of algebraic expressions? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
593 views
1 answer
    I'm trying to get the nth root of a number using JavaScript, but I don't see a way to do it using the ... the best algorithm to do this myself? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
695 views
1 answer
    How can I traverse an n-ary tree without using recursion? Recursive way: traverse(Node node) { if(node == null) ... )) { traverse(child); } } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
603 views
1 answer
    Given a list of time ranges, I need to find the maximum number of overlaps. Following is a dataset showing a 10 ... be grateful. TIA, Steve F See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
477 views
1 answer
    The Towers of Hanoi problem is a classic problem for recursion. You are given 3 pegs with disks on one of them, and ... such as HanoiK 2 [1; 2] See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
489 views
1 answer
    If I have a vector of values and want to check that they are all the same, what is the best way to do this ... vector - but maybe I'm wrong. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...