Sorting Definition and 75 Threads
-
Comp Sci Which number was used as a pivot?
Okay i know the answer as indicated on ms ...i just want to check if there is a general rule for finding the number used as the pivot?- chwala
- Thread
- Algorithm Pivot Sorting
- Replies: 8
- Forum: Engineering and Comp Sci Homework Help
-
Unexpected behavior in Excel when sorting
I'm trying to sort this sheet in Excel. I want to sort it on Column D. I select the entire page by clicking the black arrow in the upper left corner: Now I Data > Sort which brings up a dialogue where I specify the column I want to sort by : (I can already tell there may be a problem -...- DaveC426913
- Thread
- Excel Sorting
- Replies: 9
- Forum: Computing and Technology
-
T
DeepMind AI Develops Efficient Sorting Algorithms
https://arstechnica.com/science/2023/06/googles-deepmind-develops-a-system-that-writes-efficient-algorithms/- Tom.G
- Thread
- Ai Optimization Sorting
- Replies: 7
- Forum: Programming and Computer Science
-
Sorting an Array of 2-D Records
I've just started learning sorting algorithms on arrays of records and wanted to ensure I'm not doing it wrong so I have a basic question. I am sorting an array of records, where the records have two components, A and B. For example a record (3,2) has an A value of 3 and a B value of 2. The...- logical3902490
- Thread
- Array Sorting
- Replies: 6
- Forum: Programming and Computer Science
-
R
Comparing sorting algorithms -- Insertion Sort vs. Merge Sort
The answer says insertion sort runs faster when we're sorting less than 43 items. I agree but with the condition that the first item will not be faster. Why does the answer not mention this? Is it because it is insignificantly faster?- r0bHadz
- Thread
- Algorithms Sort Sorting
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
T
Entropy in the Brazil Nut Sorting Effect
In Brazil Nut effect /Granular convection the large grains move upward and the smaller ones go downward. This sorting is supposed to reduce the multiplicity of this system. But according to the second law of thermodynamics, entropy and multiplicity of the system should increase. I am looking...- Tahmeed
- Thread
- Brazil Convection Entropy Granular Second law of thermodyanmics Sorting
- Replies: 4
- Forum: Thermodynamics
-
T
New Nearest Neighbor & Sorting approach
Finding the Nearest Neighbor in a dataset has always been considered difficult, needing data-specific coding. Now some researchers, trying to prove there is no universal approach, say they have found one. This first link is to the 'popular' article...- Tom.G
- Thread
- Approach Nearest neighbor Sorting
- Replies: 2
- Forum: Programming and Computer Science
-
S
Can Sorting Ever Be Done in Time Proportional to n?
The question(s) here can be asked for many problems (and not just sorting). Let's consider the standard case of sorting an array of size ##n## containing numbers. If we consider a naive algorithm, its time would be proportional to ##n^2##. For example, the naive algorithm could be proceed with...- SSequence
- Thread
- Analysis Sorting Time
- Replies: 12
- Forum: Programming and Computer Science
-
E
Generic QuickSort causing StackOverflow?
I have to sort an array in increasing order based on the compareTo method. I'm not allowed to use the Arrays, Collections, Set, or Map classes. Here's my code: public static <T extends Comparable<? super T>> void sort (T[] arr) { // If arr is null, empty, // or only has...- Enharmonics
- Thread
- sorting
- Replies: 6
- Forum: Programming and Computer Science
-
E
Java Recursively sorting an array of strings w/o aux. parameter
One of my professor's assignments is proving particularly tricky for me. It reads: "Write the method public static void sort(String[] a) that sorts the array a in increasing order. The method must be a short recursive program. Do not use quicksort or merge sort. It should be a lot...- Enharmonics
- Thread
- Array Arrays Java Parameter Recursion Sorting Strings
- Replies: 7
- Forum: Programming and Computer Science
-
Sorting Revisited #3: Linked List Merge Sort
Links to prior threads https://www.physicsforums.com/threads/sorting-revisited-again.728448 https://www.physicsforums.com/threads/sorting-revisited.218369 https://www.physicsforums.com/threads/efficient-sorting.181589 https://www.physicsforums.com/threads/merge-sort-using-linked-indexes.786487...- rcgldr
- Thread
- Sorting
- Replies: 2
- Forum: Programming and Computer Science
-
Why does this sorting algorithm properly sort the array?
Homework Statement Consider the following sorting algorithm for an array of numbers (Assume the size n of the array is divisible by 3): • Sort the initial 2/3 of the array. • Sort the final 2/3 and then again the initial 2/3. Reason that this algorithm properly sorts the array. What is its...- TheMathNoob
- Thread
- Algorithm Proof Sorting
- Replies: 12
- Forum: Precalculus Mathematics Homework Help
-
Sorting by moving groups of numbers
It all starts with a shuffling. We have a sorted list, we take out groups of numbers and we insert them in random positions: Then, it is about sorting the numbers back using the same approach, in a minimum numbers of steps (which doesn't have to be identical to a number of steps taken during...- Borek
- Thread
- Groups Numbers Sorting
- Replies: 6
- Forum: Programming and Computer Science
-
G
C: Sorting and searching data from separated files
Homework Statement Write a program that reads data from binary file EMPLOYEE.DAT (employees are proffesors and teaching assistants, assume that the file exists). Split data about proffesors and teaching assistants in two separate text files and sort data by ID using insertion sort algorithm...- gruba
- Thread
- Data files Programming c Sorting
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
S
Is this considered a valid sorting algorithm?
Let me know if I've invented a valid [FONT=Courier New]O(n) sorting algorithm. public void Sort ( this List<T> L ) { // Check every second whether L is sorted // Given enough time, natural bit flips will eventually make L sorted while ( !L.IsSorted() ) Thread.Sleep(1000); }...- SlurrerOfSpeech
- Thread
- Algorithm Sorting
- Replies: 8
- Forum: Programming and Computer Science
-
M
Tips for sorting conferences in CV
I am a freshly graduated engineering student and am currently writing my first CV. At the end of my studies I attended one conference as a research paper author and another one as a guest lecturer on the same topic as the previous conference. I suppose both are important to be included in a CV...- MartinV279
- Thread
- Conference Cv Engineering Sorting Tips
- Replies: 7
- Forum: STEM Career Guidance
-
D
Sorting/shuffling machine for trading cards (sports, Magic+)
I work with a company that buys and sells millions of trading cards every year but the majority of these are sold for fractions of a penny if they're sold at all. From what I can see there are two options for this company to get more out of these cards, both of which are incredibly...- donvenado
- Thread
- Cards Machine Magic Sorting Sports
- Replies: 3
- Forum: Mechanical Engineering
-
T
Comp Sci How to Save and Sort a List of Historical Events in Java?
Homework Statement You are provided the following list that contains (semi-random) years from modern history. Save the list to a text file named “events.txt” Write a program that: 1. Reads in the file “events.txt” 2. Sorts it with the latest events first 3. Determines whether the founding of...- thatguy101
- Thread
- Arrays File Java Sorting
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
S
Can Physics Optimize the Storage of L Beams in a Confined Space?
Hi What is the most efficient way to theoretically store an L beam in a given area, the more beams in that area the better, obvioustly this can't be done in real life but with a physics engine could maybe be calculated? Note: Each beam can be at any rotation or any axis. The area is 21.06 cm...- SNIPE
- Thread
- Physics Physics engine Sorting
- Replies: 4
- Forum: General Engineering
-
MHB Selection Sort & Insertion Sort: Step-by-Step Guide to Sorting Data
How to do this? Show the step by step how the following data is sorted into ascending order using the given sorting algorithm : 22 85 43 28 65 35 i) Selection sort. ii) Insertion Sort.- Henry R
- Thread
- Algorithm Sorting
- Replies: 3
- Forum: Programming and Computer Science
-
MHB Sorting $m$ Integers in $O(m)$ Time
Hello! (Smile) How could we show that we can sort $m$ integers with values between $0$ and $m^2-1$ in $O(m)$ time? (Thinking)- evinda
- Thread
- Integers Sorting Time
- Replies: 9
- Forum: Programming and Computer Science
-
M
MHB Sorting $8$ Players in $24$ Hours: Is it Possible?
Hey! :o We have $8$ players and we want to sort them in $24$ hours. There is one stadium. Each game lasts one hour. In how many hours can we sort them?? (Wondering) I thought that we could it as followed: $$\boxed{P1} \ \boxed{P2} \ \boxed{P3} \ \boxed{P4} \ \boxed{P5} \ \boxed{P6} \...- mathmari
- Thread
- Sorting
- Replies: 1
- Forum: Programming and Computer Science
-
H
Comp Sci Problems With Sorting A Linked List In Java
Homework Statement Create a SortedLinkedList class which implements the LinkedListInterface. Remember to use the Comparable class Basically, I need to implement a sorted linked list that uses generics and uses compareTo to sort objects. I need it to be able to sort names...- heatengine516
- Thread
- Java List Online classes Sorting
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
How does radix sort perform on partially sorted data?
Added radix sort to sort examples in: http://rcgldr.net/misc/sortv.zip Results on my system: Time to sort 4,194,304 64 bit elements of psuedo random data: radix sort rsortv.cpp 203 ms hybrid (radix+merge) sort hsortv.cpp 265 ms merge sort...- rcgldr
- Thread
- Sorting
- Replies: 2
- Forum: Programming and Computer Science
-
A
How are there so many sorting algorithms?
I was looking through the list of sorting algorithms and there are so many of them! A simple problem where each element is less that or greater than the next term has so many solutions. How is that? My question is a rhetorical one but is there any limit to number of different techniques for...- Avichal
- Thread
- Algorithms Sorting
- Replies: 10
- Forum: Programming and Computer Science
-
S
Programs Sorting my life out and getting my degree
I'm not going to give you guys the full story, but I will summarise. A fair few years ago, I got into some trouble, starting drinking far too much and basically went of the rails. I got kicked out of uni, ended up going to prison for a little bit, almost died after being stabbed and got into a...- smileandbehappy
- Thread
- Degree Life Sorting
- Replies: 10
- Forum: STEM Academic Advising
-
S
How is particle manipulation used to sort nuclear reactors?
Is there any manipulation of nuclear particle to sort out the nuclear reactor?- Sudip Pradhan
- Thread
- Manipulation Nuclear Nuclear reactors Particle Sorting
- Replies: 1
- Forum: Nuclear Engineering
-
K
Automatic sorting with barcode identification inside a refrigerator
I'm endeavoring to prototype a challenging sorting mechanism inside a fridge and would appreciate any tips on how to get from the specs to a plausible design. #Problem The aim of the game is to identify and sort food items in the limited space of a fridge - such that a user would push...- KristjanLaane
- Thread
- Automatic Identification Refrigerator Sorting
- Replies: 5
- Forum: Mechanical Engineering
-
T
Comp Sci Sorting array into ascending order in C++
Homework Statement a. Define an array with a maximum of 20 integers values, and fill the array with numbers input from the keyboard or assigned by the program. Then write a function named split() that reads the array and places all zeros or positive...- tri5
- Thread
- Array C++ Sorting
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
D
Integrals and Convolution: How to Group Multiple Functions Together?
Hi, I shall show the following: (f*g) \star (f*g) = (f\star f)*(g\star g) where * denotes convolution and \star cross-correlation. Writing this in terms of integral & regrouping: \int_{\phi} \left(\int_{\tau_1} f(t - \tau_1) g(\tau_1) d\tau_1\right) \cdot \left(\int_{\tau_2} f(\tau_2)...- divB
- Thread
- Integrals Multiple Multiple integrals Sorting
- Replies: 6
- Forum: Calculus and Beyond Homework Help
-
D
Sorting Fractions: Does Adding 1 to the Denominator Affect Order?
Hello friends, I am attempting to solve this problem for a sorting algorithm with a lot of elements in fraction form (I'm avoiding floating point operations). My question is: Given a sequence of increasing fractions, does adding 1 to the denominator affect the ordering of th sequence...- DataHead
- Thread
- Fractions Sorting
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
X
Java Java. Searching and sorting a stack
I'm trying a practice problem from the book. It's 10 books with title, ISBN, and year. The input needs to be sorted by year and it needs to let you search for a book title. class LinkedStack { /** The Node class is used to implement the linked list. */...- XodoX
- Thread
- Java Sorting
- Replies: 5
- Forum: Programming and Computer Science
-
M
Engineering ball sorting project, static electricity
Hello all, I am an engineering student currently undertaking a project at univeristy. It involves the sorting of 4 different balls of which I have deduced how to sort 2 of them leaving just 2 types of balls to sort... The remaining two are of identical size, 10mm in radius, and are...- matthew.mre
- Thread
- Ball Electricity Engineering Project Sorting Static Static electricity
- Replies: 2
- Forum: Mechanical Engineering
-
M
Sorting Algorithm Performance - Interview-Based Problem
Hi guys, My professor recently asked a challenging question - he says it's been asked on an interview and he wanted to pose it as a homework. Attached is the graph of sorting algorithm performance. The interviewer asks: "Tell me everything you can about this algorithm just by looking at...- Monte_Carlo
- Thread
- Algorithm performance Sorting
- Replies: 25
- Forum: Engineering and Comp Sci Homework Help
-
S
Comp Sci Linked list sorting method in java
Homework Statement I need to write a sorting method for my IntNode class. this is supposed to use the selection sort algorithm. Homework Equations selection sort algorithm given by problem while(the first list still has some nodes { 1. find the node with the largest element of...- schapman22
- Thread
- Java List Method Sorting
- Replies: 11
- Forum: Engineering and Comp Sci Homework Help
-
C
Sorting Lattice Energies: KF, MgS, RbI
Homework Statement Place the following in order of decreasing magnitude of lattice energy. KF, MgS, RbI I'm not really sure how to do this without looking up the lattice energy values with each. And I don't think that is what our teacher wants us to do- cdoss
- Thread
- Energies Lattice Sorting
- Replies: 1
- Forum: Biology and Chemistry Homework Help
-
A
Automotive What are the key differences between Mopar and Ford V-8 engines?
being a Mopar person and enjoying the simplicity of their engine lineup many times I've listened to a Ford person and walked away shaking my head. Mopar small blocks: 318 and 340. 273 was early and went bye-bye. 360 was smog 340. Mopar big blocks: 383 and 440. Hemi was heads stuck on 440. there...- average guy
- Thread
- Engines Sorting
- Replies: 22
- Forum: Mechanical Engineering
-
J
Mathematica [Mathematica] Sorting polynomial terms
Hi. Can someone explain to me how to sort a Series so that the terms are in increasing powers of the exponent? For example the code: myseries = Normal[ Series[Sqrt[1 - w], {w, 0, 5}]] /. w -> 1/z produces 1-\frac{7}{256 z^5}-\frac{5}{128 z^4}-\frac{1}{16 z^3}-\frac{1}{8 z^2}-\frac{1}{2...- jackmell
- Thread
- Mathematica Polynomial Sorting Terms
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
N
Merge Sorting 3 Lists of Similar Size
1. Implement a new version of mergeSort() where 3 sorted lists (instead of 2) of about the same size are merged. 2. No equations 3. here is what i have so far: public final class Sort { /** * Simple insertion sort. * @param a an array of Comparable items...- nshs
- Thread
- Sorting
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
M
Sorting 2d array with qsort, keeping rows in order (C)
I have been trying to get qsort to sort the rows of a 2d array I read in from a data file, and I have not been having much success to get it to do what I want. My array is a 4xarraysize array, where arraysize is the number of columns read in from a data file, with four entrees per row. I...- Mute
- Thread
- 2d Array Sorting
- Replies: 5
- Forum: Programming and Computer Science
-
B
Strange glitches in my C sorting program
Homework Statement I have to write a program that takes in a file that looks like this: 3424: 313 4334: 543 etc. and sorts the numbers on the write. Everything for getting the file into an array was done for me so I know it's correct. I'm having two strange problems. First, whenever I'm...- Bob Busby
- Thread
- Program Sorting Strange
- Replies: 7
- Forum: Engineering and Comp Sci Homework Help
-
M
Directed acyclic graph profit sorting
Suppose we have a directed acyclic graph. The nodes are labeled with integers (which may be negative). Imagine that the labels represent payoffs or costs of taking an action associated with each node. In order to perform an action you must perform prerequisite actions indicated by the graph...- mXSCNT
- Thread
- Graph Sorting
- Replies: 3
- Forum: Set Theory, Logic, Probability, Statistics
-
G
Sorting sample from exponential
What is the function that I get when I take a large sample from an exponential distribution (many values from the same distribution) and sort the sample points. I'm a bit surprised it's not really exponential. The shape seems to fit some data I have nicely, but I don't know the function to fit...- Gerenuk
- Thread
- Exponential Sorting
- Replies: 7
- Forum: Set Theory, Logic, Probability, Statistics
-
M
Mathematica Mathematica - sorting NSolve solutions
Hello, everyone. I have a code written in Mathematica that loads a single file in turn. Each file contains a 200×2 array of numbers which are x,y coordinates of points. I feed each line of each file in a loop that contains a NSolve equation system. The equation system returns 5 outputs for...- MartinV
- Thread
- Mathematica Sorting
- Replies: 52
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
O
Sorting Different Materials Balls By Weight: Most Efficient Method
I have 5 different types of balls made out of different materials, all similar but not identical in weight, and all of the the same size. What is the best mechanism to sort these by weight? I can use any mechanical device to sort these balls, such as seesaws, etc. What is the most efficient way?- omalleyt
- Thread
- Balls Materials Method Sorting Weight
- Replies: 1
- Forum: General Engineering
-
S
Solve Sorting Technique Problem with 4 Elementary Sorts
Hello I'm having problem in solving this question with c/c++ code , please help me ? An eccentric doctor visits his patients in order of decreasing age. Patients entering the waiting list specify not only their names but also their ages. Each time the doctor wants to visit a patient, the...- shayanahmad
- Thread
- Sorting
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
N
Sorting Fresh & Boiled Eggs with an Inclined Plane
Homework Statement here i am going to sort out fresh and hard boil egg. i suggested that used incline plane. It is expected that the boil egg will pass through the second positive gradient incline while the fresh egg are not. Homework Equations so my question is, what the equation involve...- no183
- Thread
- Inclined Inclined plane Plane Sorting
- Replies: 2
- Forum: Introductory Physics Homework Help
-
L
How to Sort Word Frequencies in a C Program?
Homework Statement Develop a C program that to count how many times each word appears in a large text file. Your program must read words from a file and output the number of times each word of the file appears. 1. Implement an algorithm to count how many times each word appears in a large...- lynk26
- Thread
- Array Sorting
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
M
Sorting from smallest to largest in C
Homework Statement I have to create a program that will sort an array of structs with random numbers from smallest to largest. Homework Equations This is my code right now. #include <stdio.h> #include <stdlib.h> #include <time.h> typedef struct { int a; int b; } pie...- mossfan563
- Thread
- Sorting
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
V
Is Quick Sort the Most Efficient Sorting Algorithm Available?
Is quick sort the most efficient algorithm or there is a possibility of a perfect sorting algorithm to be discovered?- viv0411
- Thread
- Algorithms Sorting
- Replies: 2
- Forum: Programming and Computer Science