Skip to main content
Tweeted twitter.com/StackCodeGolf/status/1615227416581898241
Add longer test cases
Source Link
justhalf
  • 2.3k
  • 1
  • 20
  • 34
 2 010110 1 5 3 001110111101010111 0 0 1 001100011000111 8 127 512 987654321 0110100110000110111111111110110100010101100000000001101010111101111010110111100110100010110001  
 010110 2 001110111101010111 1 5 3 001100011000111 0 0 1 00111011110010111 Invalid (a new number starts with 1) 1 Invalid (a new number starts with 1) 0011000110001 Invalid (not complete) 001100011001101001100 Invalid (not complete) 0011000110011010 Invalid (not complete) 0110100110000110111111111110110100010101100000000001101010111101111010110111100110100010110001 8 127 512 987654321  
 2 010110 1 5 3 001110111101010111 0 0 1 001100011000111 
 010110 2 001110111101010111 1 5 3 001100011000111 0 0 1 00111011110010111 Invalid (a new number starts with 1) 1 Invalid (a new number starts with 1) 0011000110001 Invalid (not complete) 001100011001101001100 Invalid (not complete) 0011000110011010 Invalid (not complete) 
 2 010110 1 5 3 001110111101010111 0 0 1 001100011000111 8 127 512 987654321 0110100110000110111111111110110100010101100000000001101010111101111010110111100110100010110001  
 010110 2 001110111101010111 1 5 3 001100011000111 0 0 1 00111011110010111 Invalid (a new number starts with 1) 1 Invalid (a new number starts with 1) 0011000110001 Invalid (not complete) 001100011001101001100 Invalid (not complete) 0011000110011010 Invalid (not complete) 0110100110000110111111111110110100010101100000000001101010111101111010110111100110100010110001 8 127 512 987654321  
Add more test cases for decoder in invalid encoding
Source Link
justhalf
  • 2.3k
  • 1
  • 20
  • 34
 010110 2 001110111101010111 1 5 3 001100011000111 0 0 1 00111011110010111 Invalid (a new number starts with 1) 1 Invalid (a new number starts with 1) 0011000110001 Invalid (not complete) 001100011001101001100 Invalid (not complete) 0011000110011010 Invalid (not complete)  
 010110 2 001110111101010111 1 5 3 001100011000111 0 0 1 00111011110010111 Invalid (a new number starts with 1) 1 Invalid (a new number starts with 1) 0011000110001 Invalid (not complete) 
 010110 2 001110111101010111 1 5 3 001100011000111 0 0 1 00111011110010111 Invalid (a new number starts with 1) 1 Invalid (a new number starts with 1) 0011000110001 Invalid (not complete) 001100011001101001100 Invalid (not complete) 0011000110011010 Invalid (not complete)  
Add back empty string test case for decoder
Source Link
justhalf
  • 2.3k
  • 1
  • 20
  • 34
 010110 2 001110111101010111 1 5 3 001100011000111 0 0 1 00111011110010111 Invalid (a new number starts with 1) 1 Invalid (a new number starts with 1) 0011000110001 Invalid (not complete)   
 010110 2 001110111101010111 1 5 3 001100011000111 0 0 1 00111011110010111 Invalid (a new number starts with 1) 1 Invalid (a new number starts with 1) 0011000110001 Invalid (not complete) 
 010110 2 001110111101010111 1 5 3 001100011000111 0 0 1 00111011110010111 Invalid (a new number starts with 1) 1 Invalid (a new number starts with 1) 0011000110001 Invalid (not complete)   
Became Hot Network Question
Clarification on throwing exception on invalid decoder input
Source Link
justhalf
  • 2.3k
  • 1
  • 20
  • 34
Loading
mathjax
Source Link
corvus_192
  • 5.9k
  • 16
  • 26
Loading
Source Link
justhalf
  • 2.3k
  • 1
  • 20
  • 34
Loading