Company: visa_14dec
Difficulty: medium
Memory Allocator body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; line-height: 1.6; color: #333; max-width: 800px; margin: 20px auto; padding: 0 15px; } h1, h2, h3 { border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; } code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; background-color: #f6f8fa; padding: 0.2em 0.4em; margin: 0; font-size: 85%; border-radius: 3px; } pre { background-color: #f6f8fa; padding: 16px; overflow: auto; border-radius: 3px; } pre code { padding: 0; margin: 0; font-size: 100%; background-color: transparent; } ul, ol { padding-left: 20px; } li { margin-bottom: 10px; } strong { font-weight: 600; } Memory Allocator Description You are given an array of integers memory consisting of 0 's and 1 's which indicates whether the corresponding memory unit is free or not. memory[i] == 0 means that the i th mem