Q11.The following pseudocode is executed using the "Words" dataset.
```
Procedure doSomething(Table T1, Table T2)
count = 0
while(Table T1 has more rows){
Read the first row Y from Table T1
Read the first row Z from Table T2
if(Y.Word == Z.Word){
count = count + 1
}
else{
return(count)
}
Move the row Y to Table T1
Move the row Z to Table T2
}
return(count)
End doSomething
```
Let there be two datasets stored in Table 1 and Table 2 corresponding to the following sentences:
Table 1: "data science is an exciting field with great scope"
Table 2: "data science is a growing domain with many jobs"
What will `doSomething(Table 1, Table 2)` return? Assume that upper case and lower case are ignored during comparison of words.
Save
Check
Details
Q11
13 Jul 2025
Q11.The following pseudocode is executed using the "Words" dataset.
```
Procedure doSomething(Table T1, Table T2)
count = 0
while(Table T1 has more rows){
Read the first row Y from Table T1
Read the first row Z from Table T2
if(Y.Word == Z.Word){
count = count + 1
}
else{
return(count)
}
Move the row Y to Table T1
Move the row Z to Table T2
}
return(count)
End doSomething
```
Let there be two datasets stored in Table 1 and Table 2 corresponding to the following sentences:
Table 1: "data science is an exciting field with great scope"
Table 2: "data science is a growing domain with many jobs"
What will `doSomething(Table 1, Table 2)` return? Assume that upper case and lower case are ignored during comparison of words.