15,794,475 members
Home / Discussions / Algorithms

# Algorithms

 Looking for "card playing" algorithm David Crow4-Jan-21 10:30 David Crow 4-Jan-21 10:30
 Re: Looking for "card playing" algorithm Ralf Meier4-Jan-21 10:43 Ralf Meier 4-Jan-21 10:43
 Re: Looking for "card playing" algorithm Peter_in_27804-Jan-21 12:15 Peter_in_2780 4-Jan-21 12:15
 Re: Looking for "card playing" algorithm jsc426-Jan-21 5:33 jsc42 6-Jan-21 5:33
 Re: Looking for "card playing" algorithm Peter_in_27806-Jan-21 13:46 Peter_in_2780 6-Jan-21 13:46
 Re: Looking for "card playing" algorithm Gerry Schmitz5-Jan-21 4:27 Gerry Schmitz 5-Jan-21 4:27
 formulate an algorithm Member 1502086714-Dec-20 7:59 Member 15020867 14-Dec-20 7:59
 ```Suppose your operations on arrays were constrained as follows: - .get(i) accesses the element at index position 𝑖 in read-only fashion. - .length() returns the length of the array. - .flip(i) flips the array up to index position 𝑖. Thus, the {1,2,3,4}.flip(2) operation changes the array to {3,2,1,4}. Only these three operations are available to you. Also assume that the three operations are in 𝑂(1). Develop an algorithm that sorts a given array in 𝑂(𝑛 × 𝑙𝑜𝑔 𝑛). Suppose you have an array of length 𝑖 + 1. You want to correctly sort the element at position 𝑖. The array is already sorted up to 𝑖 - 1. The correct position of the element at position 𝑖 is index position 𝑗. Find a sequence of flip operations that inserts the element in the correct location. Problem: I have no idea how to begin```modified 14-Dec-20 13:06pm.
 Re: formulate an algorithm Greg Utas14-Dec-20 8:31 Greg Utas 14-Dec-20 8:31
 Re: formulate an algorithm Gerry Schmitz14-Dec-20 12:37 Gerry Schmitz 14-Dec-20 12:37
 Re: formulate an algorithm Patrice T14-Dec-20 13:38 Patrice T 14-Dec-20 13:38
 Re: formulate an algorithm Member 1525570320-Jun-21 21:01 Member 15255703 20-Jun-21 21:01
 Problem in c language Member 150165689-Dec-20 4:16 Member 15016568 9-Dec-20 4:16
 Re: Problem in c language Richard Deeming9-Dec-20 4:43 Richard Deeming 9-Dec-20 4:43
 Re: Problem in c language CHill609-Dec-20 4:44 CHill60 9-Dec-20 4:44
 Re: Problem in c language Serhii Oleksenko15-May-21 2:38 Serhii Oleksenko 15-May-21 2:38
 Stamp circular trade Shir Gans29-Nov-20 7:25 Shir Gans 29-Nov-20 7:25
 Re: Stamp circular trade Gerry Schmitz29-Nov-20 19:40 Gerry Schmitz 29-Nov-20 19:40
 Re: Stamp circular trade Mircea Neacsu6-Dec-20 6:45 Mircea Neacsu 6-Dec-20 6:45
 Re: Stamp circular trade Shir Gans6-Dec-20 8:51 Shir Gans 6-Dec-20 8:51
 Given an array x, get the array y from a data set of arrays which has the smallest distance to x Member 1499380315-Nov-20 18:17 Member 14993803 15-Nov-20 18:17
 CLOSED AlgoHelp14-Nov-20 0:31 AlgoHelp 14-Nov-20 0:31
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 2:48 Greg Utas 14-Nov-20 2:48
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 4:04 Greg Utas 14-Nov-20 4:04
 CLOSED AlgoHelp14-Nov-20 4:49 AlgoHelp 14-Nov-20 4:49
 Last Visit: 31-Dec-99 19:00     Last Update: 4-Dec-23 16:03 Refresh ᐊ Prev1...6789101112131415 Next ᐅ