Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

def anagramSolution1(s1,s2): alist = list(s2) pos1 = 0 stillOK = True while pos1 < len(s1) and stillOK: pos2 = 0 found = False while pos2

def anagramSolution1(s1,s2): alist = list(s2)

pos1 = 0 stillOK = True

while pos1 < len(s1) and stillOK: pos2 = 0 found = False while pos2 < len(alist) and not found: if s1[pos1] == alist[pos2]: found = True else: pos2 = pos2 + 1

if found: alist[pos2] = None else: stillOK = False

pos1 = pos1 + 1

return stillOK

include all operations and calculate the Big-O and the values for c and n0.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

8 ) With regards to computer programming, what is a variable?

Answered: 1 week ago