Sort Definition and 146 Threads
-
J
MHB When Bubble Sort to sort a list of numbers 7, 12, 5, 22, 13, 32
Can somebody tell me which example is right when a question that is given to me says to bubble sort a list of numbers 7, 12, 5, 22, 13, 32? I found two examples and one was with a graph that included Original List, Pass 1, Pass 2, Pass 3, Pass 4, Pass, 5, and Pass 6, the numbers with 7 on one...- Joystar77
- Thread
- Bubble List Numbers Sort
- Replies: 6
- Forum: Programming and Computer Science
-
What sort of wage should I expect once I graduate my PhD?
I'm a little bit over half way through my PhD (particle physics) at a good UK university and I don't know what I'll do next. So far the only things in my head are "post-doc" or "something else", but I'd like to know roughly what sort of wage you would be happy with if you were in my shoes...- Doofy
- Thread
- Graduate Phd Sort
- Replies: 6
- Forum: STEM Career Guidance
-
A
Why insertion sort works better than quick-sort for small data?
I have seen in books that when number of elements is small ~ 30-40 insertion sort is recommended. Why is that? The worst case of insertion sort is n2 whereas for quick-sort it is nlogn. nlogn beats n2 for all values of n isn't it? Then why?- Avichal
- Thread
- Data Sort Works
- Replies: 6
- Forum: Programming and Computer Science
-
MHB Earth Rope Challenge: 6m Longer - How High?
This isn't so much a challenge problem as much as it has a startling (at least I think so) answer. Say we tie a rope around the Earth. Now we are going to cut it and add another 6 meters to it. If we pull the new rope tight (in a circle) how high is the new rope above the Earth's surface...- topsquark
- Thread
- Challenge Sort
- Replies: 6
- Forum: General Math
-
J
Java Java question: Need some sort of global variable.
Just wondering if the Java experts here could help me. As part of a project I'm making a function [FONT="Courier New"]rand9() that returns a pseudo-random number 0 through 9. The problem is that each time it's called I need a certain number to increment so that it can generate a new (not...- Jamin2112
- Thread
- Global Java Sort Variable
- Replies: 6
- Forum: Programming and Computer Science
-
R
Does the relativity of simultaneity imply a sort of determinism?
This came up at lunch today when a friend of mine brought up that he had recently watched the Nova episode of Fabric of the Cosmos where they talk about spacetime as a sort of loaf where relative motion has the effect of cutting different angled slices out of the "loaf" of space time (for those...- RLutz
- Thread
- Determinism Relativity Relativity of simultaneity Simultaneity Sort
- Replies: 17
- Forum: Special and General Relativity
-
C
What sort of atmosphere could a rogue planet have?
Let's say that a planet of approximately Earth's size - containing, as Earth does, core heat - were tossed out of orbit. Could it maintain any sort of atmosphere, or would all the component gases liquify and freeze, or be gradually lost to space? If it could retain any atmosphere, what gaseous...- CCWilson
- Thread
- Atmosphere Planet Sort
- Replies: 2
- Forum: Astronomy and Astrophysics
-
S
Java [Java] what's wrong with my bubble sort algorithms?
I have 2 possibilities, non of them worked: PD: I am sure that all the methods inside this method(s) are correct and I am sure that the program's GUI is refreshing effectively. public void metodo1() { for (int i=0; i<(perros.size()); i++){ for (int j=perros.size()-1...- stonecoldgen
- Thread
- Algorithms Bubble Java Sort
- Replies: 2
- Forum: Programming and Computer Science
-
T
What sort of experiments can be doen with Graphite ?
What sort of experiments can be doen with Graphite ?? I need experiments that can be done for the research of graphite.. GOt any ideas??- th3whit3fang
- Thread
- Experiments Graphite Sort
- Replies: 8
- Forum: Classical Physics
-
T
Is There a Calculus Relationship Between These Kinematics Equations?
{ y }_{ f }={ y }_{ i }+{ v }_{ yi }t+\frac { 1 }{ 2 } { a }_{ y }{ t }^{ 2 }\\ { v }_{ yf }={ v }_{ yi }+{ a }_{ y }t It almost looks like the second equation is the derivative of the first equation with respect to time.- tahayassen
- Thread
- Calculus Kinematics Kinematics equations Relationship Sort
- Replies: 5
- Forum: Mechanics
-
K
How to Analyze Bubble Sort Algorithm Efficiency?
Hello, I need to analyze some bubble sort algorithm and calculate the probability of each conditional statements(if,for,while,ect...) be successful. I can post the algorithms if you need to see them. Thanks in advance- kadaj6
- Thread
- Algorithm Analysis Bubble Sort
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
N
Number of comparisons in an insertion sort
Homework Statement How many comparisons does the insertion sort use to sort the list n, n-1, ...2, 1? Homework Equations The Attempt at a Solution Insertion sort compares every element with every other element in the list, but I'm unsure what this question is asking. Why does it...- nicnicman
- Thread
- Sort
- Replies: 14
- Forum: Engineering and Comp Sci Homework Help
-
M
Find the Best Optimization Method for Creating Test Groups - Mike
I am looking for a term to describe a sort of "optimization" that I am trying to do. Hi everybody, I am a college student who unfortunately is not smart enough to be a math major. But nonetheless I am obsessed with statistics and numbers. I have a question: I need help figuring out a term...- MJNun
- Thread
- Optimization Sort Term
- Replies: 3
- Forum: Set Theory, Logic, Probability, Statistics
-
L
From what I understand, there s some sort of computer calculating pi
... and for a long time, I took this for granted, but now I'm starting to wonder how it is doing this. From my knowledge, the only way one could calculate pi is to measure the diameter and radius of a circle, and find the ratio, but to calculate an irrational decimal as thoroughly as we have...- LastTimelord
- Thread
- Computer Pi Sort
- Replies: 6
- Forum: General Math
-
G
Troubleshooting a Segmentation Fault in a Selection Sort
please help me with a c code for the merge sort... and i am getting a segmentation fault in running this selection sort,,, please help... #include <stdio.h> int main( ) { int arr[10]; int i,j,temp; for ( i = 0 ; i<10 ; i++ ) { printf("enter the numbers: \n"); scanf("%d \n", arr[i]); } for (...- george2625
- Thread
- Fault Sort Troubleshooting
- Replies: 2
- Forum: Programming and Computer Science
-
T
Could an ~12ft rocket launch some sort of probe into space
could a large 12ft model rocket be used to launch a probe into space, such as a telescope?- Turtle^2
- Thread
- Launch Probe Rocket Sort Space
- Replies: 19
- Forum: Astronomy and Astrophysics
-
L
Need help with menu driven search and sort program
Hello, this is sort of a big program and I wrote out the program, but I'm unsure about a lot of things. The program is supposed to give the user a menu of choices: 1) Fill the array with random numbers. 2) Print the array. 3) Search the array. 4) Sort the array. 5) Quit. Option one is...- leroyjenkens
- Thread
- Program Search Sort
- Replies: 46
- Forum: Programming and Computer Science
-
D
Engineering What sort of engineering is best for this?
I want to work in massive industrial scenarios - power plants, oil refineries, steel mills, oil rigs, etc. Now I know that there are probably multiple that are more specialized for each of these, but is there one engineering that sort of encompasses all of these and would allow one to have a...- drailing
- Thread
- Engineering Sort
- Replies: 7
- Forum: STEM Career Guidance
-
M
Maths for Postgraduate String Theory: Analysis, Algebra, or Topology?
I admit I don't know anything about string theory (nobody really does at an undergraduate level) but it sounds interesting and seems like something challenging. I am majoring in physics and maths but I am getting to the point in my undergraduate studies where I can begin to specialize more in my...- mitcho
- Thread
- Focus Postgraduate Sort String Work
- Replies: 1
- Forum: STEM Academic Advising
-
What sort of cable connector is this?
I don't think this is technical enough to post it in EE so I'm hoping someone in my project my supervisor bought this thing, it's power supply uses a cable shown in the attached image, problem is it is about a foot long. For the sake of a tidier work space we are trying to find an extension...- wukunlin
- Thread
- Cable Sort
- Replies: 1
- Forum: General Discussion
-
F
MHB Why is the runtime of Merge Sort O(n log n)?
For megre sort alogirthm the runtime is T(n)=nb+cnlog(n). It's not quite clear to me why this is O(nlogn) is it because b and c are constants?- find_the_fun
- Thread
- Runtime Sort
- Replies: 1
- Forum: Programming and Computer Science
-
A
Is there such a site where you can participate projects of all sort?
You know, like drawing PCB, coding some C, come up with best chip models? And at the same time, gain experience and learn from others?- Alex_Sanders
- Thread
- Projects Sort
- Replies: 11
- Forum: Electrical Engineering
-
R
How to sort a list alphabetically but ignore numbers?
I have a list of urls I need to sort but I need to sort them only using the letters in the url? Eg. example.com/174353/a example.com/3452344/c example.com/435322/d example.com/2342/b example.com/23456/e Would be sorted as: example.com/174353/a example.com/2342/b example.com/3452344/c...- rollcast
- Thread
- List Numbers Sort
- Replies: 7
- Forum: Computing and Technology
-
E
Looking for some sort of 'cable quick release'
I'm working on a design project and I need to find what I would call a 'cable quick release'. Basically, I need to be able to quickly release a cable that has ~3500 pounds of tension in it. Ideally, one would just use a pin you could pull out, but I'm fairly certain that would be difficult if...- ehilge
- Thread
- Release Sort
- Replies: 7
- Forum: General Engineering
-
S
Schools How to Pursue Physics After College: Advice Needed
Hello everyone, Long long ago, I thought of being a physics major. When I came into into college, I had no experience with physics, problem sets, mathematics higher than trigonometry(very little trig), or much science(my school didn't really offer good science classes). I discovered physics...- Starlit_day
- Thread
- Graduate Graduate school Physics School Sort
- Replies: 3
- Forum: STEM Academic Advising
-
C/C++ C++:How to Make sort function work with Double and Integer type
So I have a simple selection sort function written. It takes an array of type [FONT="Courier New"]double as the array to be sorted. If I declare the array to be of type [FONT="Courier New"]int in my [FONT="Courier New"]main program and then pass it to my sSort function, it gets mad. There must...- Saladsamurai
- Thread
- Function Integer Sort Type Work
- Replies: 3
- Forum: Programming and Computer Science
-
1
Don't know why selection sort isn't working?
Homework Statement to accept 10 names and print alphabetically Homework Equations The Attempt at a Solution public class n1_s {void main(){ int min,c,q;String t; String n[]={"b","k","a","w","e"}; for(int i=0;i<4;i++) {min=i...- 1/2"
- Thread
- Sort
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
A
Help Me Debug My Merge Sort Algorithm
Hi I'm trying to program a merge sort algorithm on python but it just doesn't work! I first implemented a fusion algorithm which takes as arguments a list A divided into 2 sorted sub lists A[p..q] and A[q+1..r]. Fusion then returns the list A completely sorted. This program seems to work...- azerty12
- Thread
- Algorithm Sort
- Replies: 1
- Forum: Programming and Computer Science
-
N
Where to start? It's been a long time since I've been in any sort of education.
Hello guys, I'm new to the forums and am in need of some guidance. I left secondary school in 2008 with beyond terrible GCSE's. All my school life I had been an exceptionally hard worker, and had been predicted A's in most of my GCSE's. Then something happened in my life that crushed me...- NinetyOne
- Thread
- Education Sort Time
- Replies: 3
- Forum: STEM Academic Advising
-
M
Bubble sort doesn't stop as expected
This was written in python as an excersie, it's a terribly inefficient use of python. Still I don't understand why the sort doesn't stop as soon as possible can anyone one point out the error? def bubbleSort (theList): size = len(theList) - 1 while (size > 0): index = 0...- mr.me
- Thread
- Bubble Sort
- Replies: 23
- Forum: Engineering and Comp Sci Homework Help
-
A
Short easy question, what does this sort of plus minus symbol mean?
I'm studying for a quantum exam and there is this symbol that looks like an inverted plus minus but the minus is attached to the plus... kind of like _ + but attached. in context: "x ± vt = constant or x = (-/+) + constant." Thanks for any speedy help!- aschulz90
- Thread
- Mean Short Sort Symbol
- Replies: 6
- Forum: Precalculus Mathematics Homework Help
-
M
What sort of mathematics for mathematical physics?
I am hoping to do mathematical or theoretical physics after my undergraduate science degree. I have been advised to do more maths subjects than physics subjects in order to achieve this. I am double majoring in maths and physics and I am just wondering what area of maths I should be focusing on...- mitcho
- Thread
- Mathematical Mathematical physics Mathematics Physics Sort
- Replies: 4
- Forum: STEM Academic Advising
-
A
Comp Sci How can I fix an error in the insertion sort while loop in a Java program?
So i haven't done java in about two years, its been a while since I've seen arrays. THe assignment is to fix a program that was given to me. I found one error but in the insertion sort part i can't get it to run the while loop. I can't make any fundamental changes to the program, basically i...- apiwowar
- Thread
- Java Sort
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
C Bubble Sort Help | Get Programming Assistance
Hi, I am trying to write a program that sorts an array of random numbers. Unfortunately, it does not work out as i had hoped, I am getting some strange output. Here's my code: #include <stdio.h> #include <stdlib.h> /* Function Prototypes */ int rand(void); void srand(unsigned...- James889
- Thread
- Bubble Sort
- Replies: 8
- Forum: Engineering and Comp Sci Homework Help
-
A
Is there an explicit solution to the equation \sqrt{Ax-x^3}+\sqrt{Bx-x^3}=C?
Solving a cubic... sort of! Hi, Can the equation \sqrt{Ax-x^3}+\sqrt{Bx-x^3}=C be solved explicitly? All of MathLab, Maple and WolframAlpha seem to give an explicit solution but they don't show how they come to it. I'm afraid they may be missing other possible solutions. Thanks,- Apteronotus
- Thread
- Cubic Sort
- Replies: 13
- Forum: General Math
-
O
Some sort of transform to find the log of a series
I am trying to write a computer program that involves finding 2 very large numbers (several thousand digits) and dividing them to get a reasonable sized number. the first number is a value of the gamma function, which can be defined as a product and thus easy to reduce with logs (find the sum...- onanox
- Thread
- Log Series Sort Transform
- Replies: 5
- Forum: General Math
-
P
Hey guys,I'm looking for some sort of mosfet/relay/switch that can
Hey guys, I'm looking for some sort of mosfet/relay/switch that can handle up to 1 milliamp and 8kV. I don't understand the technology very well, but from talking to some people, I know I can put 2 4kV mosfets in series to achieve my 8kV goal. On the other hand, while looking for relays, I...- petitericeball
- Thread
- Hey Sort
- Replies: 4
- Forum: Electrical Engineering
-
D
Using the Insertion Sort algorithm on a linked list
Homework Statement Hi there, I wish this wasn't my first post but unfortunately, it is. I will try to contribute later in the semester when my workload is less. On to the topic, the problem is I have to implement the insertion sort algorithm on a linked list. I have the algorithm for Java...- dudeface
- Thread
- Algorithm List Sort
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
S
Java How to Fix Errors in Alphabetically Sorting Full Names in Java?
import javax.swing.*; import java.util.Arrays; public class sortSelection { public static void main(String args[]) { String inputString; char temp; inputString = JOptionPane.showInputDialog("Enter Your Name"); char a = inputString.charAt(0); char b =...- sunbuster
- Thread
- Sort
- Replies: 1
- Forum: Programming and Computer Science
-
J
Understanding Bubble Sort Algorithms
Anyone familiar with a bubble sort? and if so how to implement it?- Juanka
- Thread
- Algorithms Bubble Sort
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
C
Help Sort My Confusion on dH, TdS and dQ
I would like to know if someone here can help sort out my confusion... It is easy to derive that dU=TdS-pdV (no particle exchange) Then enthalpy H=U+pV will imply dH=TdS+Vdp That means under a constant temperature (dT=0) and constant pressure (dp=0) situation dH=TdS>(=) dQ Why is it...- calculus_jy
- Thread
- Confusion Sort
- Replies: 7
- Forum: Classical Physics
-
P
Fabricate a sort of home radar/tracking system
a friend and i plan to design and fabricate a sort of home radar/tracking system.the objective goes like this.there is a dark room and we are flying a remote controlled helicopter(a small one).it is desired that a radar/tracking system placed on the floor should track it,follow it and hit it...- polka129
- Thread
- Home Sort System
- Replies: 10
- Forum: Mechanical Engineering
-
G
Incline + Spring = Hours of Fun. Sort of.
Homework Statement A 1.71 kg package is released on a 54.1 deg incline, 4.00m from a long spring with force constant 141 N/m that is attached at the bottom of the incline . The coefficients of friction between the package and the incline are 0.39 and 0.24. The mass of the spring is...- glossolalia
- Thread
- Fun Incline Sort Spring
- Replies: 5
- Forum: Introductory Physics Homework Help
-
Are you the sort of person who sees a new gadget for the home, and
Are you the sort of person who sees a new gadget for the home, and thinks it's a must have, or are you the type of person who still has such like a none electric can opener.- wolram
- Thread
- Home Sort
- Replies: 25
- Forum: General Discussion
-
P
Is there some sort of state of matter between a liquid and a gas?
We've all heard of the three states of matter: solids, liquids, and gases. Recently someone told me that there is some sort of state of matter between a liquid and a gas. Does anyone know what he's talking about?- partialfracti
- Thread
- Gas Liquid Matter Sort State State of matter
- Replies: 3
- Forum: Classical Physics
-
M
Integration of a complicated sort
Homework Statement Here's the original problem in all of its glory... \int_0^{T/2} \,\sin((2\pi(t)/T) - \alpha) \, dt Homework Equations U Substitution Trig identities (possibly) The Attempt at a Solution Using U substitution I've got u=2\pi(t)/T -\alpha Which means that du= 2\pi/T dt...- mateomy
- Thread
- Integration Sort
- Replies: 8
- Forum: Calculus and Beyond Homework Help
-
B
Help me sort my life out? (aka: 'To PhD, or not to PhD?')
Hey all, I'm wondering if anyone here can help me try and get things straight in my mind about what I'm going to do next. I'm currently studying Part III (the courses in QFT, Symmetries, Strings etc) and already people are starting to talk about PhD applications, since it seems to be assumed...- BenAHMS
- Thread
- Life Phd Sort
- Replies: 7
- Forum: STEM Career Guidance
-
R
Comp Sci Computer Science - LSD Radix Sort in Java
Title kind of explains what I'm trying to do here. I know exactly how radix sort is SUPPOSED to work but I just don't have a clue how to go about coding it. Basically what I am asking for is some java based pseudo-code just to get me in the right direction. I'm specifically sorting an...- RyMi
- Thread
- Computer Computer science Java Science Sort
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
B
Programs Theoretical or just physics degree? Maths is sort of good, is that enough?
Hey, as you may have guessed I'm thinking of taking a Theoretical Physics course rather than just straight Physics, but that due to its maths-heavy nature I'm worried I might not cope all that well. I mean, I love the idea of theoretical - admittedly it's a rather romanticised view of it - but...- B.A. Maracas
- Thread
- Degree Physics Physics degree Sort Theoretical
- Replies: 2
- Forum: STEM Academic Advising
-
K
C Program Help: Count & Sort Word Occurrences in File
C program help! Hey guys I am having trouble completing this C program. Its suppose to ask the user to enter a file to read from, read the file, count how many times each word appears and print the results in a different file(also user input) arranged from high occurrence. Heres what i...- KV305
- Thread
- Count File Program Sort
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help