Question: I created a solution to [this](https://leetcode.com/problems/repeated-dna-sequences/) problem on leetcode: 

> 
> All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the DNA.
> 
> 
> Write a function to find all the 10-letter-long sequences (substrings) that occur more than once in a DNA molecule.
> 
> 
> 

My solution causes an **out of memory exception**:

```
class Solution:
    # @param {string} s
    # @return {string[]}
    def findRepeatedDnaSequences(self, s):
        seen_so_far = set()
        results = set()
        for seq in self.window(10, s):
            if seq in seen_so_far:
                results.add(seq)
            else:
                seen_so_far.add(seq)
        return list(results)

    def window(self, window_size, array):
        window_start = 0
        window_end = window_size
        while window_end < len(array):
            yield array[window_start:window_end+1]
            window_end += window_size

```

**This solution works:**

```
class Solution:
    # @param {string} s
    # @return {string[]}
    def findRepeatedDnaSequences(self, s):
        d = {}
        res = []
        for i in range(len(s)):
            key = s[i:i+10]
            if key not in d:
                d[key] = 1
            else:
                d[key] += 1

        for e in d:
            if d[e] > 1:
                res.append(e)

        return res

```

**They seem essentially the same. What am I missing?**

Answer: 
this works fine for me, its just that your class names are wrong, the class-names should be `.col-1` and `.col-2`: 

```
$(document).ready(function() {
    var divHeight = $('.col-1').height(); 
    $('.col-2').css('min-height', divHeight+'px');
});  

```

Here is the [Fiddle](https://jsfiddle.net/Luthando/kqhkbhe4/) 

**EDIT- *Based on comments:***  

You can do all this without using jquery 

1. **Flexbox *(not supported in IE 8 & 9)*** - if you apply the flex to the parent div, it will make all its children heights equal: 

```
 .row{ display: flex;}  

```
2. **table** - you can give your div's the table layout 

```
.row {display: table; }

.row div { display: table-cell;}

```
Add a resize event listener, when **col-2** resize, trigger a function to resize **col-2**

```
$(document).ready(function() {
    $('.tb-col1').resize(function(){
       var divHeight = $('.col-2').height(); 
       $('.col-2').css('minHeight', divHeight+'px');
    }
});

```