Checkout
checkout
view
Your Cart Your Cart: item(s)
Add to Shopping Cart
$2.19 Instant Download
Computer Science, Software Design and Architecture
Year 1

Need help with Algorithm to determine if an Array contains Unique ElementsEnter


I need to determine if my array is unique and in ascending order.  I've got the ascending order part figured out but am not sure that I'm doing the unique part correctly.  Could you check my pseudocode to see if I have it right?  I not, please give me direction on how to do this.


Enter
Read N
SUB = 0
VALID_TABLE = ‘Yes’
UNIQUE_TABLE = ‘Yes’
DOWHILE SUB <= N
SUB = SUB + 1
Read A(SUB)
        IF A(SUB-1) > A(SUB) THEN
                VALID_TABLE = ‘No’
ELSE
      IF A(SUB) = A(SUB+1) THEN
      UNIQUE_TABLE = ‘No’
       (ELSE)
       ENDIF
        ENDIF    
ENDDO
Return

By OTA:  Mike Noel, MS

OTA Rating:  4.9/5

Your Price:  $2.19  (original value ~$7.98)

What's included:

  • Plain text response
$2.19 Download Add to Cart

Add to Shopping Cart
$2.19 Instant Download

Page generated in 0.0128 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples