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
761 views
1 answer
    You are given 2^32-2 unique numbers that range from 1 to 2^32-1. It's impossible to fit all the ... ints are passed in through standard in. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
910 views
1 answer
    According to Wikipedia, accessing any single element in an array takes constant time as only one operation has to be ... is done in O(1)? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
756 views
1 answer
    I am looking for a way to generate all possible permutations of a list of elements. Something similar to python' ... get these n! permutations. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
854 views
1 answer
    After reading this interesting question I was reminded of a tricky interview question I had once that I never ... how to solve this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
621 views
1 answer
    I would like to write a small program simulating many particle collisions, starting first in 2D (I would extend ... interested in more depth. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
771 views
1 answer
    You may have heard about the well-known problem of finding the longest increasing subsequence. The optimal ... subsequences in given sequence. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
626 views
1 answer
    I am getting a trouble finding an approach to solve this problem. Input-output sequences are as follows : ** ... "agcta2". Any help appreciated. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
936 views
1 answer
    I am working on a project where I produce an aluminium extrusion cutting list. The aluminium extrusions come in lengths ... ) and is very fast. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I have a two-dimensional array, say 0 0 0 0 0 0 2 3 4 0 0 9 1 5 0 0 8 7 6 0 0 0 0 0 0 And i need ... 1] topRight = array[x+1][y-1] # etc Thanks! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
801 views
1 answer
    There is an integer array d which does not contain more than two elements of the same value. How many ... Please help solve this problem. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
854 views
1 answer
    Let me try to explain the situation the best I can. Lets say I have 3 values 1, 2, 3 I tell an ... Know any good methods of doing this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
747 views
1 answer
    Given a string A and another string B. Find whether any permutation of B exists as a substring of A. For ... a better and a faster solution. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
815 views
1 answer
    I came across this problem quite recently. Suppose there are n points on x-axis, x[0],x[1] .. x[n-1] ... must be taken to solve this problem? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
676 views
1 answer
    Here is an excise: Let G be a weighted directed graph with n vertices and m edges, where all edges have ... better algorithm for this problem? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
769 views
1 answer
    Given an array [a1b7c3d2] convert to [abcd1732] with O(1) space and O(n) time i.e. put the letters on ... not better. Can somebody please help? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
815 views
1 answer
    Given as input, a sorted array of floats, I need to find the total number of pairs (i,j) such as A[i]* ... if there is a more optimal solution. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
709 views
1 answer
    I want to write a program that, given a list of points in 3D-space, represented as an array of x,y,z ... the best-fit line using it)? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
666 views
1 answer
    Let's say that you have a list of 10,000 email addresses, and you'd like to find what some of the ... choice of algorithms for this problem? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
779 views
1 answer
    Does anyone know how Java implements its hash tables (HashSet or HashMap)? Given the various types of objects that ... work well for all cases. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
871 views
1 answer
    I have an indented text file that will be used to build a tree. Each line represents a node, and indents ... back from each recursion call. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
931 views
1 answer
    I have two rays on a 2D plane that extend to infinity, but both have a starting point. They are both ... a fast algorithm to solve this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    I have a non-grid-aligned set of input values associated with grid-aligned output values. Given a new input ... using those U,V coordinates. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
825 views
1 answer
    For a polygon defined as a sequence of (x,y) points, how can I detect whether it is complex or not? A complex ... a time complexity of O(N2)? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
714 views
1 answer
    I'm looking for an algorithm or example material to study for predicting future events based on known patterns. ... me to learn something new. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
816 views
1 answer
    I've been tasked to write an implementation of the A* algorithm (heuristics provided) that will solve the ... don't see the connection. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
760 views
1 answer
    I'm working on a homework problem that asks me this: Tiven a finite set of numbers, and a target number, ... appreciate help on this. thanks. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
848 views
1 answer
    I have read through some tutorials about two common data structure which can achieve range update and query in O(lg ... range index is 0-based. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
941 views
1 answer
    I tried the following : 1) DFS, keeping track of level of each vertex in my DFS tree 2) Each time a ... cycle in undirected graphs ? Thanks. See Question&Answers more detail:os...
asked Oct 24, 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

...