7 kyu

Simple remove duplicates

398 of 14,962KenKamau
Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • JohanWiltink Avatar

    LC translation

  • brodiemark Avatar

    It would be helpful to either add some small random tests, or provide a message that identifies the first element where actual differs from expected. Currently, if actual and expected are almost identical, debugging is quite difficult.

  • akar-0 Avatar

    Julia: random tests are affected by input modification:

    
    Time: 6326ms Passed: 4Failed: 101Exit Code: 1
    Test Results:
    solve
    Basic tests
    Random test
    solve(res) --> ref(res)
    solve([45, 13, 16, 6, 24, 19, 13, 11, 1, 34, 5, 41, 41, 38, 23, 25, 39, 13, 39, 25, 21, 28, 35, 46, 45, 34, 27, 21, 45, 9, 0, 9, 16, 25, 5, 45, 27, 15, 21, 19, 21, 36, 9, 35, 43, 22, 11, 8, 32, 6, 17, 32, 5, 15, 45, 14, 37, 37, 20, 43, 9, 44, 9, 19, 34, 16, 15, 3, 10, 43, 11, 15, 15, 40, 42, 32, 24, 13, 43, 8, 29, 31, 19, 40, 0, 43, 29, 7, 22, 7, 31, 19, 41])
      Expected: Int64[]
      Occurred: [1, 38, 23, 39, 28, 46, 25, 27, 21, 36, 35, 6, 17, 5, 45, 14, 37, 20, 44, 9, 34, 16, 3, 10, 11, 15, 42, 32, 24, 13, 8, 40, 0, 43, 29, 22, 7, 31, 19, 41]
    solve(res) --> ref(res)
    solve([20, 62, 99, 50, 104, 10, 105, 4, 84, 71, 103, 26, 41, 70, 20, 84, 90, 11, 103, 73, 3, 74, 38, 49, 107, 17, 67, 1, 19, 54, 50, 39, 61, 58, 50, 4, 24, 38, 25, 83, 3, 88, 84, 44, 101, 39, 35, 77, 62, 29, 96, 57, 23, 47, 88, 4, 38, 8, 87, 75, 38, 39, 91, 18, 99, 41, 38, 61, 37, 85, 3, 50, 90, 97, 91, 17, 102, 85, 15, 21, 52, 102, 10, 49, 95, 51, 69, 70, 7, 55, 44, 38, 37, 31, 83, 36, 39, 76, 32, 14, 72, 41, 46, 106, 54, 106, 26, 12, 26, 64, 66, 41, 81, 16, 68, 74, 54, 23, 92, 83, 48, 80, 71, 24, 1, 57, 82, 32, 100, 106, 55, 75, 35, 20, 49, 63, 5, 34, 100, 37, 90, 57, 2, 86, 54, 58, 92, 88, 22, 106, 44, 96, 49, 23, 42, 74, 24, 62, 31, 45, 100, 28, 42, 46, 65, 8, 15, 81, 51, 99, 60, 76, 52, 9, 15, 37, 97, 103, 43, 5, 7, 102, 69, 55, 69, 60, 31, 71, 80, 40, 15, 49, 84, 37, 61, 80, 86, 31, 106, 34, 92, 102, 8, 29, 96, 48, 51, 63, 95, 93, 103, 39, 106, 100, 66, 74, 30])
      Expected: Int64[]
      Occurred: [104, 105, 11, 73, 107, 67, 19, 25, 101, 77, 47, 4, 87, 18, 3, 50, 91, 17, 85, 21, 10, 70, 38, 36, 14, 72, 12, 26, 64, 41, 16, 68, 83, 1, 82, 32, 75, 35, 20, 90, 57, 2, 54, 58, 88, 22, 44, 23, 24, 62, 45, 28, 42, 46, 65, 81, 99, 76, 52, 9, 97, 43, 5, 7, 55, 69, 60, 71, 40, 15, 49, 84, 37, 61, 80, 86, 31, 34, 92, 102, 8, 29, 96, 48, 51, 63, 95, 93, 103, 39, 106, 100, 66, 74, 30]
    solve(res) --> ref(res)
    solve([68, 4, 42, 88, 73, 24, 12, 70, 86, 105, 26, 20, 7, 4, 118, 46, 107, 64, 109, 103, 28, 3, 60, 32, 77, 8, 85, 91, 75, 24, 112, 79, 69, 34, 96, 93, 95, 4, 100, 41, 107, 90, 71, 14, 71, 67, 57, 38, 24, 110, 85, 112, 75, 10, 104, 111, 17, 8, 18, 8, 53, 25, 14, 106, 77, 69, 77, 67, 84, 44, 84, 7, 55, 20, 28, 34, 29, 104, 27, 98, 3, 59, 39, 12, 18, 80, 82, 2, 110, 110, 79, 15, 115, 119, 86, 37, 3, 71, 72, 93, 85, 14, 65, 100, 120, 29, 80, 88, 120, 0, 15, 25, 45, 63, 98, 106, 45, 78, 113, 24, 25, 26, 111, 104, 4, 112, 120, 7, 90, 59, 103, 17, 111, 27, 3, 38, 108, 20, 102, 67, 69, 96, 17, 63, 80, 69, 46, 67, 57, 47, 98, 1, 67, 63, 55, 61, 95, 33, 54, 15, 46, 117, 59, 65, 64, 43, 82, 112, 118, 49, 77, 21, 43, 81, 85, 43, 76, 15, 98, 115, 65, 29, 14, 26, 19, 41, 48, 107, 1, 110, 93, 110, 22, 49, 70, 1, 18, 59, 86, 47, 54, 45, 104, 31, 40, 78, 83, 3, 97, 96, 70, 20, 19, 63, 108, 119, 39, 103, 71, 34, 29, 20, 74, 49, 15, 98, 65, 105, 17, 56, 60, 81, 77, 53, 74, 5, 52, 84, 88, 97, 41])
      Expected: Int64[]
      Occurred: [68, 42, 73, 109, 32, 91, 75, 10, 8, 44, 28, 12, 2, 79, 37, 72, 100, 0, 106, 113, 24, 25, 4, 120, 7, 90, 111, 27, 38, 102, 80, 69, 57, 67, 55, 61, 95, 33, 46, 117, 64, 82, 112, 118, 21, 85, 43, 76, 115, 14, 26, 48, 107, 93, 110, 22, 1, 18, 59, 86, 47, 54, 45, 104, 31, 40, 78, 83, 3, 96, 70, 19, 63, 108, 119, 39, 103, 71, 34, 29, 20, 49, 15, 98, 65, 105, 17, 56, 60, 81, 77, 53, 74, 5, 52, 84, 88, 97, 41]
    solve(res) --> ref(res)
    solve([88, 67, 82, 36, 111, 86, 83, 85, 3, 89, 46, 32, 95, 93, 81, 66, 97, 84, 24, 95, 46, 20, 113, 7, 77, 19, 13, 70, 42, 60, 69, 63, 19, 41, 60, 77, 67, 71, 98, 61, 46, 92, 104, 44, 36, 72, 20, 71, 76, 14, 61, 101, 6, 81, 11, 48, 12, 5, 38, 106, 86, 99, 26, 106, 79, 76, 83, 61, 32, 26, 28, 109, 42, 8, 8, 12, 97, 99, 115, 14, 86, 108, 54, 48, 82, 71, 108, 33, 60, 4, 1, 37, 31, 60, 67, 39, 79, 52, 114, 61, 105, 109, 95, 82, 94, 109, 28, 36, 28, 76, 99, 59, 79, 11, 48, 112, 7, 3, 83, 77, 115, 70, 96, 114, 21, 95, 80, 105, 25, 102, 39, 113, 36, 109, 30, 8, 65, 71, 1, 52, 16, 36, 66, 74, 4, 92, 19, 25, 28, 70, 70, 63, 93, 36, 41, 101, 23, 59, 69, 80, 51, 100, 100, 112, 81, 51, 34, 95, 26, 69, 68, 89, 65, 40, 81, 87, 111, 47, 27, 73, 0, 81, 111, 51, 106, 62, 36, 56, 47, 46, 43, 22, 97, 58, 80, 87, 60, 102, 98, 69, 54, 81, 109, 48, 89, 64, 52, 0, 27, 68, 88, 75, 20, 78, 68, 21, 67, 66, 40, 22, 75, 104, 19, 106, 92, 65, 105, 90, 84, 69, 26, 93])
      Expected: Int64[]
      Occurred: [85, 24, 13, 44, 72, 6, 5, 38, 32, 42, 12, 14, 86, 108, 33, 37, 31, 61, 82, 94, 76, 99, 79, 11, 7, 3, 83, 77, 115, 96, 114, 39, 113, 30, 8, 71, 1, 16, 74, 4, 25, 28, 70, 63, 41, 101, 23, 59, 100, 112, 34, 95, 73, 111, 51, 62, 36, 56, 47, 46, 43, 97, 58, 80, 87, 60, 102, 98, 54, 81, 109, 48, 89, 64, 52, 0, 27, 88, 20, 78, 68, 21, 67, 66, 40, 22, 75, 104, 19, 106, 92, 65, 105, 90, 84, 69, 26, 93]
    solve(res) --> ref(res)
    solve([115, 70, 210, 199, 142, 89, 105, 9, 237, 53, 177, 158, 174, 191, 136, 174, 129, 142, 115, 191, 162, 129, 135, 134, 116, 229, 172, 107, 208, 76, 181, 80, 133, 239, 51, 159, 50, 207, 41, 76, 128, 166, 97, 219, 76, 108, 71, 49, 155, 195, 89, 151, 221, 52, 206, 200, 32, 72, 71, 245, 201, 79, 193, 130, 1, 155, 190, 8, 217, 198, 196, 115, 85, 109, 199, 234, 205, 150, 144, 135, 68, 19, 238, 155, 132, 154, 206, 139, 10, 102, 24, 1, 15, 26, 40, 102, 226, 94, 222, 180, 19, 51, 53, 36, 151, 103, 110, 221, 152, 20, 21, 217, 5, 199, 219, 62, 83, 38, 202, 106, 215, 201, 158, 96, 243, 117, 138, 13, 238, 158, 57, 189, 170, 191, 56, 142, 52, 10, 180, 201, 185, 130, 216, 136, 41, 104, 235, 78, 238, 218, 213, 136, 8, 73, 238, 164, 63, 27, 225, 78, 188, 148, 188, 159, 87, 234, 187, 27, 47, 60, 111, 208, 242, 132, 167, 53, 237, 160, 123, 76, 220, 6, 48, 14, 139, 166, 24, 81, 169, 51, 216, 120, 46, 167, 187, 198, 96, 171, 120, 79, 189, 67, 12, 165, 54, 118, 115, 52, 146, 60, 56, 18, 194, 198, 108, 72, 83, 242, 230, 181, 207, 42, 125, 16, 245, 232, 245, 9, 240, 209, 185, 224, 184, 59, 75, 74, 187, 78, 169, 11, 54, 10, 40, 183, 152, 75, 217, 49, 221, 77, 127, 237, 244, 43, 111, 193, 41, 189, 238, 43, 220, 204, 28, 233, 43, 219, 173, 125, 175, 123, 82, 63, 112, 227, 153, 164, 99, 28, 1, 60, 136, 230, 168, 122, 45, 14, 119, 189, 60, 240, 229, 143, 3, 218, 107, 77, 162, 85, 8, 176, 112, 143, 48, 14, 88, 174, 135, 42, 5, 124, 55, 196, 89, 5, 31, 126, 98, 45, 41, 110, 106, 231, 2, 123, 39, 130, 233, 178, 86, 234, 153, 95, 237, 205, 213, 134, 197, 192, 43, 245, 122, 141, 110, 4, 48, 226, 8, 122, 47, 90, 139, 114, 148, 216, 13, 117, 183, 241, 64, 25, 150, 127, 112, 186, 175, 167, 79, 125, 3, 28, 195, 131, 104, 230, 30, 198, 74, 12, 40, 158, 122, 64, 147, 66, 187, 190, 211, 238, 151, 73, 106, 233, 158, 220, 64, 145, 134, 119, 61, 69, 212, 43, 203, 72, 51, 32, 158, 241, 123, 140, 243, 68, 12, 219, 205, 95, 110, 234, 134, 23, 206, 136, 110, 93, 199, 226, 122, 44, 35, 73, 208, 223, 225, 29, 229, 229, 235, 129, 13, 94, 34, 122, 229, 45, 67, 221, 235, 7, 236, 69, 4, 152, 245, 32, 24, 194, 161, 169, 205, 127, 245, 141, 122, 4, 60, 160, 50, 114, 192, 168, 164, 192, 155, 175, 159, 122, 215, 12, 3, 234, 148, 43, 201, 98, 17, 50, 103, 3, 170, 89, 33])
      Expected: Int64[]
      Occurred: [70, 210, 105, 177, 116, 172, 80, 133, 239, 128, 97, 200, 71, 109, 144, 154, 15, 26, 102, 222, 19, 36, 20, 21, 62, 38, 202, 138, 57, 191, 142, 180, 188, 87, 27, 132, 53, 76, 6, 166, 81, 46, 96, 171, 120, 165, 118, 115, 52, 146, 56, 18, 108, 83, 242, 181, 207, 16, 232, 9, 209, 185, 224, 184, 59, 78, 11, 54, 10, 75, 217, 49, 244, 111, 193, 204, 173, 82, 63, 227, 99, 1, 189, 240, 218, 107, 77, 162, 85, 176, 143, 14, 88, 174, 135, 42, 124, 55, 196, 5, 31, 126, 41, 231, 2, 39, 130, 178, 86, 153, 237, 213, 197, 48, 8, 47, 90, 139, 216, 117, 183, 25, 150, 112, 186, 167, 79, 125, 28, 195, 131, 104, 230, 30, 198, 74, 40, 147, 66, 187, 190, 211, 238, 151, 106, 233, 220, 64, 145, 119, 61, 212, 203, 72, 51, 158, 241, 123, 140, 243, 68, 219, 95, 134, 23, 206, 136, 110, 93, 199, 226, 44, 35, 73, 208, 223, 225, 29, 129, 13, 94, 34, 229, 45, 67, 221, 235, 7, 236, 69, 152, 32, 24, 194, 161, 169, 205, 127, 245, 141, 4, 60, 160, 114, 168, 164, 192, 155, 175, 159, 122, 215, 12, 234, 148, 43, 201, 98, 17, 50, 103, 3, 170, 89, 33]
    solve(res) --> ref(res)
    solve([35, 0, 21, 19, 22, 5, 35, 0, 28, 15, 10, 11, 18, 5, 31, 18, 25, 7, 5, 31, 2, 9, 36, 35, 17, 39, 13, 5, 41, 39, 7, 18, 27, 23, 35, 41, 10, 41, 12, 17, 7, 33, 8, 39, 32, 2, 16, 9, 7, 30, 2, 21, 12, 30, 1, 38, 30, 27, 1, 8, 12, 38, 32, 37, 6, 10, 40, 26, 8, 18, 21, 15, 26, 33, 30, 33, 30, 37, 0, 6, 10, 33, 36, 24])
      Expected: Int64[]
      Occurred: [19, 22, 28, 11, 25, 31, 13, 5, 23, 35, 41, 17, 39, 16, 9, 7, 2, 27, 1, 12, 38, 32, 40, 8, 18, 21, 15, 26, 30, 37, 0, 6, 10, 33, 36, 24]
    solve(res) --> ref(res)
    solve([190, 199, 70, 120, 82, 148, 170, 177, 184, 12, 102, 177, 77, 173, 37, 161, 34, 84, 168, 86, 174, 47, 82, 87, 194, 27, 198, 60, 130, 118, 113, 142, 141, 51, 10, 2, 180, 201, 143, 14, 53, 62, 135, 146, 141, 29, 9, 149, 54, 139, 73, 4, 98, 29, 143, 0, 23, 124, 86, 50, 118, 172, 131, 193, 49, 102, 2, 186, 57, 57, 84, 61, 119, 114, 104, 65, 134, 40, 52, 24, 170, 57, 14, 50, 18, 143, 97, 39, 170, 24, 8, 157, 177, 204, 166, 30, 122, 69, 134, 109, 27, 76, 28, 7, 58, 25, 30, 80, 123, 182, 109, 52, 126, 115, 152, 30, 114, 114, 160, 1, 60, 159, 198, 90, 168, 66, 54, 92, 169, 51, 129, 141, 25, 73, 187, 175, 79, 169, 97, 188, 30, 202, 140, 118, 54, 91, 37, 58, 153, 67, 68, 113, 14, 75, 167, 53, 42, 80, 177, 181, 73, 74, 154, 194, 153, 166, 129, 95, 41, 1, 149, 82, 9, 132, 184, 3, 28, 186, 126, 6, 128, 69, 117, 0, 114, 107, 125, 73, 94, 75, 176, 152, 50, 170, 42, 171, 165, 108, 74, 97, 190, 97, 109, 135, 153, 160, 103, 108, 154, 23, 30, 15, 125, 192, 198, 144, 101, 157, 93, 106, 37, 33, 203, 158, 100, 88, 26, 114, 113, 196, 103, 76, 32, 173, 82, 79, 57, 165, 198, 35, 96, 168, 52, 30, 32, 128, 148, 99, 93, 1, 9, 7, 26, 163, 190, 179, 71, 114, 14, 120, 16, 108, 163, 48, 171, 187, 13, 163, 130, 202, 33, 184, 102, 166, 11, 109, 111, 29, 34, 34, 187, 151, 98, 51, 202, 157, 90, 103, 128, 49, 127, 123, 86, 106, 13, 5, 55, 126, 67, 176, 148, 143, 48, 174, 63, 155, 115, 188, 113, 45, 35, 187, 74, 165, 42, 147, 126, 118, 102, 68, 189, 60, 58, 97, 46, 40, 138, 203, 24, 182, 177, 161, 70, 137, 84, 43, 185, 179, 14, 149, 175, 24, 134, 60, 103, 105, 70, 65, 150, 90, 15, 157, 161, 125, 16, 124, 170, 59, 172, 28, 49, 149, 73, 192, 141, 50, 147, 86, 46, 173, 186, 204, 99, 166, 42, 148, 94, 198, 28, 199, 177, 173, 133, 176, 17, 202, 55, 26, 134, 200, 185, 151, 203, 31, 168, 183, 66, 23, 103, 197, 182, 82, 92, 94, 41, 88, 32, 61, 200, 101])
      Expected: Int64[]
      Occurred: [12, 77, 47, 87, 142, 10, 180, 201, 62, 146, 139, 4, 131, 193, 2, 119, 104, 18, 39, 8, 122, 27, 159, 25, 169, 140, 54, 91, 167, 53, 80, 181, 194, 129, 95, 132, 3, 6, 69, 117, 0, 107, 75, 152, 135, 153, 160, 154, 144, 37, 158, 100, 196, 76, 79, 57, 96, 52, 30, 93, 1, 9, 7, 190, 71, 114, 120, 108, 171, 163, 130, 33, 184, 11, 109, 111, 29, 34, 98, 51, 128, 127, 123, 106, 13, 5, 67, 143, 48, 174, 63, 155, 115, 188, 113, 45, 35, 187, 74, 165, 126, 118, 102, 68, 189, 58, 97, 40, 138, 137, 84, 43, 179, 14, 175, 24, 60, 105, 70, 65, 150, 90, 15, 157, 161, 125, 16, 124, 170, 59, 172, 49, 149, 73, 192, 141, 50, 147, 86, 46, 186, 204, 99, 166, 42, 148, 198, 28, 199, 177, 173, 133, 176, 17, 202, 55, 26, 134, 185, 151, 203, 31, 168, 183, 66, 23, 103, 197, 182, 82, 92, 94, 41, 88, 32, 61, 200, 101]
    solve(res) --> ref(res)
    solve([21, 31, 53, 84, 90, 29, 102, 100, 116, 52, 104, 12, 90, 118, 40, 16, 79, 4, 32, 7, 117, 66, 83, 64, 69, 38, 106, 88, 97, 47, 47, 68, 78, 83, 117, 61, 102, 135, 102, 51, 123, 112, 72, 119, 3, 79, 12, 34, 101, 12, 135, 27, 35, 79, 55, 108, 32, 97, 72, 10, 117, 86, 135, 17, 43, 56, 56, 96, 60, 102, 30, 89, 38, 106, 72, 118, 47, 46, 91, 15, 96, 29, 73, 15, 8, 13, 89, 116, 61, 32, 41, 96, 35, 42, 16, 64, 50, 127, 91, 100, 40, 20, 40, 111, 94, 61, 36, 15, 79, 58, 100, 74, 47, 123, 53, 42, 27, 57, 21, 81, 124, 70, 126, 67, 89, 66, 7, 72, 19, 47, 24, 30, 124, 50, 19, 56, 94, 7, 137, 127, 100, 32, 132, 41, 56, 123, 137, 135, 63, 23, 23, 47, 134, 71, 64, 112, 34, 131, 82, 84, 10, 117, 57, 78, 39, 125, 105, 95, 117, 100, 49, 22, 78, 77, 52, 25, 130, 28, 31, 51, 87, 35, 135, 57, 122, 67, 30, 66, 57, 54, 69, 80, 14, 114, 61, 27, 132, 6, 23, 59, 82, 127, 37, 124, 83, 128, 7, 95, 6, 49, 4, 133, 78, 63, 61, 80, 125, 30, 118, 134, 27, 85, 65, 63, 79, 20, 51, 25, 123, 111, 79, 70, 129, 129, 56, 68, 8, 60, 9, 64, 27, 125, 26, 122, 131, 6, 60, 75, 128, 121, 53, 120, 118, 131, 14, 114, 105, 117, 36, 39, 103, 81, 135, 62, 11, 91, 42, 98, 137, 84, 27, 101, 40, 122, 121, 30])
      Expected: Int64[]
      Occurred: [104, 90, 88, 119, 3, 12, 55, 108, 97, 86, 17, 43, 102, 38, 106, 46, 29, 73, 13, 116, 96, 16, 15, 58, 74, 21, 126, 89, 72, 24, 50, 19, 94, 32, 41, 47, 71, 112, 34, 10, 100, 22, 77, 52, 130, 28, 31, 87, 35, 67, 66, 57, 54, 69, 132, 23, 59, 82, 127, 37, 124, 83, 7, 95, 49, 4, 133, 78, 61, 80, 134, 85, 65, 63, 20, 51, 25, 123, 111, 79, 70, 129, 56, 68, 8, 9, 64, 125, 26, 6, 60, 75, 128, 53, 120, 118, 131, 14, 114, 105, 117, 36, 39, 103, 81, 135, 62, 11, 91, 42, 98, 137, 84, 27, 101, 40, 122, 121, 30]
    solve(res) --> ref(res)
    solve([17, 145, 92, 25, 121, 124, 40, 122, 161, 118, 2, 98, 73, 142, 21, 22, 195, 99, 98, 51, 219, 202, 51, 217, 229, 115, 61, 121, 99, 166, 65, 108, 135, 35, 8, 85, 58, 71, 16, 91, 7, 217, 44, 104, 55, 140, 19, 66, 96, 143, 121, 64, 154, 195, 181, 85, 76, 91, 4, 130, 200, 140, 197, 63, 111, 159, 7, 19, 60, 166, 20, 84, 71, 122, 104, 163, 149, 25, 82, 5, 151, 55, 138, 117, 15, 134, 202, 29, 96, 65, 185, 159, 114, 208, 55, 231, 180, 191, 26, 55, 149, 228, 201, 117, 62, 177, 157, 172, 21, 131, 222, 31, 55, 32, 138, 132, 82, 208, 109, 34, 39, 187, 43, 153, 159, 209, 137, 57, 155, 39, 136, 136, 147, 14, 137, 40, 154, 83, 36, 72, 33, 86, 149, 218, 199, 76, 114, 118, 95, 65, 93, 72, 49, 135, 37, 205, 2, 141, 72, 193, 11, 136, 97, 155, 169, 160, 13, 72, 102, 34, 206, 192, 2, 51, 206, 92, 192, 184, 83, 136, 10, 211, 37, 108, 131, 54, 122, 51, 56, 91, 143, 196, 56, 12, 165, 187, 222, 60, 135, 109, 139, 125, 217, 147, 52, 88, 102, 103, 35, 125, 48, 81, 188, 0, 234, 52, 3, 183, 78, 142, 173, 208, 69, 40, 228, 29, 63, 214, 0, 46, 13, 45, 209, 200, 115, 57, 205, 53, 127, 140, 117, 217, 9, 127, 222, 49, 207, 143, 10, 68, 225, 15, 6, 214, 179, 195, 209, 232, 125, 20, 85, 52, 81, 183, 39, 185, 43, 104, 87, 167, 176, 230, 170, 220, 60, 201, 152, 27, 201, 184, 77, 142, 224, 187, 234, 188, 139, 178, 228, 47, 160, 86, 25, 214, 50, 182, 97, 65, 49, 144, 162, 226, 28, 70, 217, 179, 78, 171, 232, 54, 91, 229, 78, 163, 231, 2, 203, 36, 125, 108, 62, 34, 14, 139, 39, 119, 5, 56, 34, 223, 226, 94, 7, 45, 100, 17, 148, 79, 187, 175, 166, 192, 160, 185, 66, 213, 123, 121, 80, 15, 28, 190, 162, 121, 42, 17, 181, 141, 209, 220, 78, 19, 80, 157, 92, 102, 159, 25, 108, 129, 158, 167, 157, 153, 3, 42, 202, 29, 57, 9, 141, 235, 175, 116, 235, 189, 150, 164, 176, 139, 162, 208, 67, 126, 73, 49, 143, 144, 128, 212, 187, 94, 168, 39, 114, 111, 72, 69, 38, 157, 21, 156, 214, 68, 2, 174, 156, 236, 147, 187, 171, 170, 13, 119, 113, 120, 34, 193, 32, 125, 36, 82, 179, 136, 126, 169, 88, 175, 36, 78, 110, 139, 62, 2, 12, 132, 87, 22, 101, 224, 138, 163, 5, 13, 22, 162, 110, 219, 217, 123, 8, 137, 31, 161, 79, 117, 115, 90, 151, 60, 142, 96, 18, 195])
      Expected: Int64[]
      Occurred: [145, 124, 98, 61, 99, 58, 16, 44, 64, 4, 130, 197, 84, 71, 134, 180, 191, 26, 177, 172, 55, 154, 33, 149, 218, 199, 76, 118, 95, 93, 11, 155, 206, 83, 211, 37, 131, 122, 51, 196, 165, 135, 109, 103, 35, 48, 173, 40, 63, 0, 46, 200, 205, 53, 140, 127, 222, 207, 10, 225, 6, 20, 85, 52, 81, 183, 43, 104, 230, 152, 27, 201, 184, 77, 234, 188, 178, 228, 47, 86, 50, 182, 97, 65, 70, 232, 54, 91, 229, 231, 203, 14, 56, 223, 226, 7, 45, 100, 148, 166, 192, 160, 185, 66, 213, 15, 28, 190, 121, 17, 181, 209, 220, 19, 80, 92, 102, 159, 25, 108, 129, 158, 167, 153, 3, 42, 202, 29, 57, 9, 141, 116, 235, 189, 150, 164, 176, 208, 67, 73, 49, 143, 144, 128, 212, 94, 168, 39, 114, 111, 72, 69, 38, 157, 21, 214, 68, 174, 156, 236, 147, 187, 171, 170, 119, 113, 120, 34, 193, 32, 125, 82, 179, 136, 126, 169, 88, 175, 36, 78, 139, 62, 2, 12, 132, 87, 101, 224, 138, 163, 5, 13, 22, 162, 110, 219, 217, 123, 8, 137, 31, 161, 79, 117, 115, 90, 151, 60, 142, 96, 18, 195]
    solve(res) --> ref(res)
    solve([48, 112, 144, 14, 116, 83, 3, 82, 41, 49, 64, 114, 159, 34, 63, 112, 9, 98, 67, 107, 135, 163, 114, 1, 38, 3, 53, 35, 110, 99, 155, 48, 68, 15, 121, 49, 163, 117, 65, 125, 121, 33, 67, 32, 24, 94, 85, 30, 36, 44, 52, 35, 53, 66, 44, 5, 51, 152, 157, 34, 143, 96, 89, 158, 103, 94, 116, 153, 65, 109, 146, 123, 144, 122, 61, 141, 87, 149, 139, 44, 101, 67, 112, 78, 149, 43, 77, 21, 16, 134, 90, 113, 147, 41, 80, 109, 20, 84, 68, 51, 77, 36, 30, 149, 51, 147, 62, 102, 14, 73, 118, 166, 58, 23, 57, 11, 41, 102, 43, 94, 70, 33, 22, 49, 4, 29, 62, 47, 158, 5, 142, 104, 40, 76, 25, 140, 6, 38, 80, 50, 132, 92, 104, 41, 13, 43, 163, 53, 120, 88, 111, 158, 53, 120, 144, 76, 60, 149, 91, 40, 97, 4, 110, 156, 76, 124, 108, 121, 74, 51, 117, 164, 130, 17, 95, 101, 157, 113, 79, 19, 104, 143, 55, 99, 130, 137, 8, 145, 5, 155, 99, 98, 18, 145, 144, 81, 149, 125, 21, 77, 92, 90, 30, 40, 99, 124, 152, 43, 155, 19, 73, 136, 130, 58, 129, 83, 17, 102, 109, 133, 15, 166, 67, 106, 38, 56, 69, 118, 5, 112, 7, 134, 109, 118, 81, 83, 118, 37, 54, 98, 148, 64, 29, 98, 162, 86, 118, 148, 139, 46, 39, 89, 14, 15, 155, 108, 82, 2, 162, 66, 66, 72, 93, 157, 145, 24, 139, 53, 141, 58, 152, 88, 79, 156, 36, 6, 88, 88, 54, 119, 165, 48, 98, 74, 120, 161, 151, 59, 72, 18, 153, 132, 8, 64, 60, 99, 120, 126, 161, 120, 45, 31, 122, 35, 161, 146, 35, 143, 115, 67, 142, 127, 121, 123, 149, 109, 32, 75, 123, 122, 141, 163, 136, 150, 106, 49, 63, 6, 123, 103, 96, 86, 27, 40])
      Expected: Int64[]
      Occurred: [159, 9, 107, 135, 114, 1, 3, 85, 52, 34, 116, 65, 61, 87, 44, 78, 16, 20, 84, 68, 147, 23, 57, 11, 94, 70, 33, 22, 62, 47, 25, 140, 80, 50, 41, 13, 111, 158, 91, 97, 4, 110, 76, 51, 117, 164, 95, 101, 113, 104, 55, 137, 144, 125, 21, 77, 92, 90, 30, 124, 43, 19, 73, 130, 129, 17, 102, 133, 166, 38, 56, 69, 5, 112, 7, 134, 81, 83, 37, 29, 118, 148, 46, 39, 89, 14, 15, 155, 108, 82, 2, 162, 66, 93, 157, 145, 24, 139, 53, 58, 152, 79, 156, 36, 88, 54, 119, 165, 48, 98, 74, 151, 59, 72, 18, 153, 132, 8, 64, 60, 99, 126, 120, 45, 31, 161, 146, 35, 143, 115, 67, 142, 127, 121, 149, 109, 32, 75, 122, 141, 163, 136, 150, 106, 49, 63, 6, 123, 103, 96, 86, 27, 40]
    solve(res) --> ref(res)
    solve([120, 0, 101, 66, 42, 126, 137, 37, 124, 51, 83, 88, 63, 136, 103, 44, 30, 141, 8, 101, 104, 79, 132, 108, 48, 49, 103, 65, 48, 14, 39, 3, 0, 120, 63, 43, 62, 1, 0, 60, 19, 20, 29, 7, 113, 101, 98, 90, 80, 63, 131, 13, 38, 51, 120, 7, 28, 58, 45, 11, 33, 3, 130, 132, 71, 15, 63, 137, 79, 2, 88, 59, 75, 115, 79, 2, 47, 63, 102, 47, 77, 56, 53, 99, 17, 104, 1, 121, 7, 80, 57, 8, 61, 86, 12, 35, 75, 114, 8, 116, 49, 96, 62, 22, 143, 138, 86, 131, 91, 44, 44, 114, 15, 143, 16, 75, 79, 96, 93, 32, 102, 130, 60, 142, 32, 61, 65, 31, 73, 116, 95, 43, 132, 56, 127, 136, 114, 115, 64, 11, 3, 27, 99, 76, 129, 78, 121, 93, 27, 87, 110, 127, 17, 129, 20, 16, 14, 125, 6, 118, 77, 92, 40, 92, 5, 22, 99, 122, 58, 93, 0, 72, 37, 82, 63, 18, 106, 130, 63, 100, 63, 100, 87, 103, 122, 128, 13, 89, 38, 126, 111, 98, 5, 139, 142, 2, 44, 116, 77, 22, 137, 50, 5, 132, 110, 114, 67, 66, 99, 65, 50, 54, 136, 59, 59, 54, 106, 94, 2, 14, 50, 28, 64, 61, 32, 73, 130, 39, 42, 127, 94, 2, 128, 17, 8, 37, 63, 121, 89, 85, 48, 43, 50, 71, 16, 111, 98, 132, 117, 88, 81, 105, 125, 107, 12, 95, 88, 97, 108, 103, 87, 78, 123, 34, 85, 104, 76, 68, 2, 80, 60, 69, 58, 103, 12, 61, 53, 114, 47, 82, 31, 22, 98, 34, 55, 30, 8])
      Expected: Int64[]
      Occurred: [124, 83, 141, 19, 29, 113, 101, 90, 51, 120, 45, 33, 1, 7, 57, 35, 49, 62, 138, 86, 131, 91, 15, 143, 75, 79, 96, 102, 56, 115, 11, 3, 27, 129, 20, 6, 118, 40, 92, 93, 0, 72, 18, 100, 122, 13, 38, 126, 139, 142, 44, 116, 77, 137, 5, 110, 67, 66, 99, 65, 136, 59, 54, 106, 14, 28, 64, 32, 73, 130, 39, 42, 127, 94, 128, 17, 37, 63, 121, 89, 48, 43, 50, 71, 16, 111, 132, 117, 81, 105, 125, 107, 95, 88, 97, 108, 87, 78, 123, 85, 104, 76, 68, 2, 80, 60, 69, 58, 103, 12, 61, 53, 114, 47, 82, 31, 22, 98, 34, 55, 30, 8]
    
  • trashy_incel Avatar

    C:

    • initial code does not compile
    • missing edge cases ({} --> {}, {1} --> {1}, {1, ..., 1} --> {1})
    • no instructions in the initial code regarding what to return

    fork fixing all

  • akar-0 Avatar

    Scala: basic tests don't compile:

    Test Results:
    SimpleRemoveDuplicatesSpec
    solve should pass basic tests
    Test Failed
    a "should" clause may not appear inside an "in" clause
    

    (Attempt tests are ok)

  • kleonn Avatar

    no honor after i solved this kata. This happens not the first time. There are bugs on this site...

  • yLaWy Avatar
  • supOurKid Avatar

    This comment has been hidden.

  • KayleighWasTaken Avatar
  • hobovsky Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/136.
    Please join the discussion to help us identify duplicate kata and retire them.

  • ejini战神 Avatar

    C# Function name should use PascalCase (Please refer to implementation of backward compatibility here )

  • Артем  Белычев Avatar

    Tell me, what about random tests? I solved the problem and pass the basic tests without any problems. However, my code does not pass random tests, and most importantly, the random test outputs only correct and incorrect results, and the original array is not shown.

  • truther17 Avatar

    This comment has been hidden.

  • JohanWiltink Avatar

    JavaScript fork with update to Node 14.x

    and language-agnostic description

  • akar-0 Avatar
  • davorpa Avatar

    what is best taking performance/memory into account?

    • loop first to mapping seen items count and then a second loop to append values according to this counter.
    • loop backwards find inside dups to append or not.
  • Lavrivskyi Avatar

    It was interesting, thanks.

  • DIST_12 Avatar

    what parameter is this szout? arrin is for given array, szin is for size of array but what is this szout? plz anyone tell

  • jewelazo Avatar

    This comment has been hidden.

  • rowcased Avatar

    C Fork kumited.

    • updated test suite
    • updated format
    • eliminated all warnings
  • Szadam88 Avatar

    Hello The duplicates are removed, but the arrays are not sequence equals. Is it intentional? Expected: [4, 6, 3], instead got: [3, 4, 6] Expected: [4, 5, 2, 1], instead got: [1, 4, 5, 2] Expected: [2, 1, 3], instead got: [1, 2, 3]

  • andreisemianiuk Avatar

    Thanks for this Kata series!

  • jtdoria Avatar

    This comment has been hidden.

  • ja101 Avatar

    This comment has been hidden.

  • Apuroks Avatar

    This comment has been hidden.

  • numerancy Avatar

    This comment has been hidden.

  • rge123 Avatar

    This comment has been hidden.

  • fcode Avatar

    This comment has been hidden.

  • aisk-coding Avatar

    This comment has been hidden.

  • TatTheFlame Avatar

    This comment has been hidden.

  • user8436785 Avatar

    PHP translation. Already had to fix a merge conflict :laughing:

  • user8436785 Avatar

    CoffeeScript :coffee:, Crystal :gem:, and Dart :dart: translations kumited.

  • GreatGhost Avatar

    This comment has been hidden.

  • Sophie789 Avatar

    hi, for a test case of [2,1,2,3], I get the expted [1,2,3] in jupyter notebook, but not passing it here... any idea why?

    Thanks!

  • Gradwanderer Avatar

    This comment has been hidden.

  • jcha5503 Avatar

    This comment has been hidden.

  • rowcased Avatar

    C translation kumited

    please scrutinize for approval

    thanks!

  • donaldsebleung Avatar

    PureScript Translation Kumited - please accept :D

  • FArekkusu Avatar

    This comment has been hidden.

  • FArekkusu Avatar

    There're already enough "remove the duplicate" katas.

  • Blind4Basics Avatar

    I don't see the additional value of this version compared to the normal one, actually... :/

  • JohanWiltink Avatar

    ( JavaScript )

    Should really check explicitly for modifying inputs.