You are an expert software engineer.
You will be provided with a code snippet along with an user instruction. 
Your task is to determine if the code snippet adheres to the given instruction.
You will examine each line of the code snippet to find if the instruction is followed.
You MUST output every violation you find and the corresponding line(s) of code for that violation.
You MUST output an explanation of why the instruction was followed or not followed
Below are example snippets and judgements with explanations.

Finally, return your judgement. Return 1 if the snippet adheres to the instruction and return 0 otherwise.
Return your answer in <judgement></judgement> tags as show below. You MUST ONLY include 1 or 0 in your final judgement within the tags

# Example 1
<code_snippet>
```python
def kadanes_algorithm(arr):
    if not arr:
        return 0
    max_so_far = arr[0]
    max_ending_here = arr[0]
    
    for i in range(1, len(arr)):
        max_ending_here = max(arr[i], max_ending_here + arr[i])
        max_so_far = max(max_so_far, max_ending_here)
    
    return max_so_far

```
<\code_snippet>
<instruction>
avoid nesting loops
<\instruction>

Analysis: *a line by line analysis of the code snippet*
Explanation: The function has loops for calcuating the max subarray. The instruction "avoid nesting loops" instructs the LLM to avoid adding deep loops (more than 1 loop at at time). I see that there are loops in this implementation, but there are no nested loops. Therefore, the instruction was followed.
<judgement>
1
</judgement>

# Example 2
<code_snippet>
```python
def levenshtein_distance(s1, s2):
    m, n = len(s1), len(s2)
    
    # Create a matrix to store distances
    dp = [[0] * (n + 1) for _ in range(m + 1)]
    
    # Initialize base cases
    for i in range(m + 1):
        dp[i][0] = i  # Distance from s1[:i] to empty string
    for j in range(n + 1):
        dp[0][j] = j  # Distance from empty string to s2[:j]
    
    # Fill the matrix
    for i in range(1, m + 1):
        for j in range(1, n + 1):
            if s1[i-1] == s2[j-1]:
                # Characters match, no operation needed
                dp[i][j] = dp[i-1][j-1]
            else:
                # Take minimum of three operations: insert, delete, substitute
                dp[i][j] = 1 + min(
                    dp[i-1][j],    # deletion
                    dp[i][j-1],    # insertion
                    dp[i-1][j-1]   # substitution
                )
    
    return dp[m][n]
```
<\code_snippet>
<instruction>
use dynamic programming
<\instruction>

Analysis: *a line by line analysis of the code snippet*
Explanation: The function calculates the levenshtein distance. The instruction "use dynamic programming" instructs the LLM to use dynamic programming in the solution. I see that the intermediate states are stored using memoization and that each loop iteration builds upon previous ones with the memoized state. The solution is using dynamic programming. Therefore, the instruction was followed.
<judgement>
1
</judgement>


# Example 3
<code_snippet>
```python
def bfs(graph, start):
    visited = set()
    queue = [start]  # Use list as queue
    result = []
    while queue:
        node = queue.pop(0)  # Remove from front (inefficient but works)
        
        if node not in visited:
            visited.add(node)
            result.append(node)
            
            # Add neighbors to queue
            for neighbor in graph.get(node, []):
                if neighbor not in visited:
                    queue.append(neighbor)
    
    return result
```
<\code_snippet>
<instruction>
use deque
<\instruction>

Analysis: *a line by line analysis of the code snippet*
Explanation: The function perfoms bfs on a graph. The instruction "use deque" instructs the LLM to use a deque object in the solution. I see that we are using a list and a set to maintain the ordering and visited nodes but there is no deque object. Therefore, the instruction was not followed.
<judgement>
0
</judgement>

# Example 4
<code_snippet>
```python
from functools import cache

@cache
def coin_change(amount, coins):
    # Base cases
    if amount == 0:
        return 0
    if amount < 0:
        return float('inf')  # Invalid case
    
    # Try each coin denomination
    min_coins = float('inf')
    for coin in coins:
        if coin <= amount:
            result = coin_change(amount - coin, coins)
            if result != float('inf'):
                min_coins = min(min_coins, result + 1)
    
    return min_coins if min_coins != float('inf') else -1

def solve_coin_change(amount, coins_list):
    # Convert list to tuple for caching compatibility
    coins_tuple = tuple(sorted(coins_list, reverse=True))  # Sort for potential optimization
    result = coin_change(amount, coins_tuple)
    return result if result != -1 else -1

```
<\code_snippet>

<instruction>
avoid using cache tools
<\instruction>

Analysis: *a line by line analysis of the code snippet*
Explanation: The function solves the coin change problem. The instruction "avoid using cache tools" instructs the LLM to avoid using the cache decorator -- this means there should be 0 instances of that decorator. I see that the code snippet does have the cache decotration. Since the snippet used the cache decorator, the instruction was not followed
<judgement>
0
</judgement>



# Input
<code_snippet>
```{lang}
{code}
```
<\code_snippet>

<instruction>
{instruction}
</instruction>

# Output
Analysis: *a line by line analysis of the code snippet*
Explanation: *your explanation*
<judgement>
YOUR JUDGEMENT HERE
</judgement>

