Monday, September 27, 2010

IsSorted

BEGIN
count list
Loop an-1 times
if a1<a2
move to next value
else
display no
END

This algorithm will return the correct answer because it will go through the array of numbers and check each to see if the next one is larger than the previous. It will end in infinite time because the loop is set to occur (an - 1) times.

Monday, September 20, 2010

Fidn the value

BEGIN
    Prompt User to enter a certain amount of numbers
    Set d as amount of numbers in the list
    Set k as test variable
    Assign a value v to k
    Assign k to drop down the list d amount of times
    For each variable check if k encounters a d that is the same value
    loop d amount of times.
    If k = v then return yes
    If k != v then return no
END

This will work because when k goes down the list it either will or will not encounter a v that is the same value.

This will end because when program reaches d amount of times the program will end.

  

Sunday, September 12, 2010

Computing to the Max

I am not too familiar with programming yet, but here is my attempt in PSUEDO code:

BEGIN
   Prompt user to enter 4 numbers
   Use the variable i to be your current number
   Use equation n ( i + 1 )
   Make code to go through each number and compare i to the next number n
   If i<n 
      Go to next number and compare
   If i>n 
      Replace value of i with n and compare next number
   Loop until i is not replaced with n
END

This is probably not the greatest way to go about it but it made sense to me. Once I am more familiar with coding I can come back and make any necessary corrections.

Wednesday, September 8, 2010

Sorting algorithm

I find it interesting that the algorithm can not be decreasing and how they tie this in with time. Time can never go backwards, or at least we don't know how to make that happen.

Stability is also very important.

Monday, August 30, 2010

Transition from High School to College

Unknown person. I was a nerd in high school. Rejected, neglected, and tossed to the floor. Never fitting in and never in style, I was the epitome of a nerd.

Things change. I am now attending ASU, that is Arizona State University for those who are still in nerdo high school. Here I am a GOD. I attend all the coolest frat parties, drink with my buddies every day, and hang out with all the hottest girls. My friends call me the "genius" because I pretty much know all that there is to know about computers and technology. Ask me any question and I can google it and get an answer for you in literally seconds! Of all the popularity I have gained with this experience of transitioning from High School to College I still consider google my best friend. He really knows all the answers, not me. That goes to show that it isn't WHAT you know but WHO you know. I know google.

I hope that this experience will last at least 6 years. I expect my classes to be extremely easy because all I do is homework. I don't have any lecture classes so that means no busy or pointless lecturing or work. It is going to be extremely efficient, just like google.

This should be a GOOGLE semester.

I am thinking of joining Sigma Feta Alpha Beta Zeta Sigma Sigma Feta Sigma Sigma Sigma this week. In order to do that I need to do 150 keg stands in 24 hours. EASY! Time to go play with my real friends: Google and Reddit.