Recent content by Kingyou123

  1. Kingyou123

    Stats Help Using Standard deviation and a population

    My professor talked about standard deviation for a short time, maybe 8 minutes. So I understand that P(-infy<z<) and P(0 < z < 1.75) gives me the proportion of runners that are slower than her, however I'm confused on what the next step would be from there. Would it be as simple as multiplying...
  2. Kingyou123

    Stats Help Using Standard deviation and a population

    So "z" would equal .4599, I'm assuming you would multiply it by 405 to get the number of runners who are faster than her. So the answer would be 186 runners?
  3. Kingyou123

    Stats Help Using Standard deviation and a population

    Homework Statement Joan’s finishing time for the Bolder Boulder 10K race was 1.75 standard deviations faster than the women’s average for her age group. There were 405 women who ran in her age group. Assuming a normal distribution, how many women ran faster than Joan. Homework Equations The...
  4. Kingyou123

    Comp Sci Infix to prefix conversion C++ Help

    @Mark44 Errors with this x = S.pop(); error can assign void to char. Any soultions? string infixToPrefix(string expression) { //FINISH ME! stack<char> S; //holds operators stack<char>output; //display like in class string prefix = ""; char ch , x; int i, j; i =...
  5. Kingyou123

    Comp Sci How can I remove the nth member in the Josephus Problem using C++?

    string Cqueue2::remove_nth_member(int n) //for Josephus problem to remove a member { string name; int i; int index; int start; name = Queue[(n - 1) % Size]; start = n%Size; //we'll be deleteing the soldier at index n%Size //subtract 1 to account for...
  6. Kingyou123

    Comp Sci Infix to prefix conversion C++ Help

    string infixToPrefix(string expression) { //FINISH ME! stack<char> S; //holds operators stack<char>output; //display like in class string prefix = ""; char ch , x; int i, j; i = expression.length() - 1; while (i!= -1) { ch= infix[i]; i--...
  7. Kingyou123

    Comp Sci How can I remove the nth member in the Josephus Problem using C++?

    Yes, i did. However I used a completely different method. I can post it if you like
  8. Kingyou123

    Comp Sci Infix to prefix conversion C++ Help

    @Mark44 , I'm confused on the void intopre part. The example uses char while my professor wants us to use strings... For example, I'm trying to find the length of the expression. cout << "Enter your prefix expression: " << endl; cin >> expression...
  9. Kingyou123

    Comp Sci Infix to prefix conversion C++ Help

    I found a different algo in my book, Sorry for the odd format, but this one seems more similar to code that my professor wants to produce. The input would be a infix question like cin>> infix icp and isp are int isp(char ch){ switch(ch) { case '+': case '-': return 1...
  10. Kingyou123

    Comp Sci Infix to prefix conversion C++ Help

    My professor did not explain what op1 and op2 meant... I figured that they were string arrays or maybe option and option 2? I was using the algo that was in my book for the second part.
  11. Kingyou123

    Comp Sci Infix to prefix conversion C++ Help

    My professor originally had this: string prefixToInfix(string expression){ //FINISH ME! string infix=""; stack<string> S; string op1,op2,ch; return infix; I changed op1 to op1[10] and this is the updated code for prefix to infix string prefixToInfix(string expression){ //FINISH ME! string...
  12. Kingyou123

    Comp Sci Infix to prefix conversion C++ Help

    Homework Statement I'm trying to create a infix to prefix converter and prefix to infix converter. I have used a example in my textbook, but it's for a infix to postfix conversion, I figured if I reversed the equation it would give the prefix. Right idea? 2. The attempt at a solution string...
  13. Kingyou123

    Comp Sci How can I remove the nth member in the Josephus Problem using C++?

    std::string *newQueue = new std::string[Size - 1]; //Transfer all before removed index, even if index will be 0 then this loop won't fire for(size_t i = 0; i < index; i++){ newQueue[i] = queue[i]; } //Transfer all after index, if index will be last element of array this loop won't fire...
  14. Kingyou123

    Comp Sci How can I remove the nth member in the Josephus Problem using C++?

    index(n - 1) % Size; name = Queue[index]; std::string *newQueue = new std::string[Size - 1]; for (size_t i = 0; i < index; i++) { newQueue[i] = queue[i]; } for (size_t i = index + 1; i < Size; i++) { newQueue[i - 1] = queue[i]...
  15. Kingyou123

    Comp Sci How can I remove the nth member in the Josephus Problem using C++?

    I was hoping on using a circle queue: For example if it counted down by 3 to select the the member of group, 0, 1,2, .Removes the 2rd person and then 3 is the next starting point, 3 ,4,5, removes 5 and then 6 is the new starting point.Eventually it would end up with one element in the queue...
Back
Top