Difference between revisions of "CodeReportSolutions"

From ZCubes Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
==Number of Different Integers in a String==
 
==Number of Different Integers in a String==
  
Video: https://www.youtube.com/watch?v=59vAjBS3yZM
+
Video: https://www.youtube.com/watch?v=59vAjBS3yZM [APL Wins (vs C++, Java & Python)]
 
 
  
 +
===z^3 Solution===
 
s="ad3343sadfsd343434df343443sff";
 
s="ad3343sadfsd343434df343443sff";
 
(s#/[^\d]+/)∪
 
(s#/[^\d]+/)∪

Revision as of 22:18, 30 July 2024

Code Report Solutions

Following are some simple solutions to videos found on YouTube. Idea is to make it easier for comparing and learning z^3 and other beautiful languages.

Number of Different Integers in a String

Video: https://www.youtube.com/watch?v=59vAjBS3yZM [APL Wins (vs C++, Java & Python)]

z^3 Solution

s="ad3343sadfsd343434df343443sff"; (s#/[^\d]+/)∪

Result: 3343 343434 343443

  1. splits string using the postfix regexp pattern. ∪ extracts unique from the results

// 12 Character Solution vs. 14 Character APL Solution