cs tut 10 and takehomelab - Checks if 2 strings are...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Checks if 2 strings are anagrams by sorting and using strcmp Checks if 2 strings are anagrams by search and mark. Search returns location of the character u search for if its found, else returns -1. After character’s location is returned, function isAnagram2 marks it by changing it into upper case: - ‘a’ + ‘A’
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Checks if 2 strings are anagram by frequency table (uses array within an array) Freq[str1[i]] – ‘a’ converts the character to its respective integer, like c to 2, b to 1 Scan and print a matrix
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/09/2012 for the course ELECTRICAL 1221 taught by Professor Tan during the Spring '11 term at National University of Singapore.

Page1 / 6

cs tut 10 and takehomelab - Checks if 2 strings are...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online