Skip to main content
added 10 characters in body
Source Link
Sanchises
  • 9.5k
  • 1
  • 36
  • 61

MATL, 22 19 bytes

tZ"ibpyn&Z@(TT35&Ya

Try it online!

Thanks @LuisMendo for saving 3 byesbytes, so now it has the same bytecount as @flawr's answer, but sufficiently different to post anyway. High-level agorithm overview:

 Z"                  % Create n x m matrix of spaces
           (         % Index into this matrix:
   i                 %  The alphabet vermicelli (explicit input)
        &Z@          %  at a random locations (randperm), which are
      yn             %   length(S) numbers, ranging
t   bp               %   from 1 to n*m
            TT35&Ya  % And finally add a border
      

MATL, 19 bytes

tZ"ibpyn&Z@(TT35&Ya

Try it online!

Thanks @LuisMendo for saving 3 byes, so now it has the same bytecount as @flawr's answer, but sufficiently different to post anyway. High-level agorithm overview:

 Z"                  % Create n x m matrix of spaces
           (         % Index into this matrix:
   i                 %  The alphabet vermicelli (explicit input)
        &Z@          %  at a random locations (randperm), which are
      yn             %   length(S) numbers, ranging
t   bp               %   from 1 to n*m
            TT35&Ya  % And finally add a border
      

MATL, 22 19 bytes

tZ"ibpyn&Z@(TT35&Ya

Try it online!

Thanks @LuisMendo for saving 3 bytes, so now it has the same bytecount as @flawr's answer, but sufficiently different to post anyway. High-level agorithm overview:

 Z"                  % Create n x m matrix of spaces
           (         % Index into this matrix:
   i                 %  The alphabet vermicelli (explicit input)
        &Z@          %  at a random locations (randperm), which are
      yn             %   length(S) numbers, ranging
t   bp               %   from 1 to n*m
            TT35&Ya  % And finally add a border
      
added 32 characters in body
Source Link
Sanchises
  • 9.5k
  • 1
  • 36
  • 61

MATL, 2219 bytes

tZ}&Oibpyn&Z@tZ"ibpyn&Z@(TT35&YacTT35&Ya

Try it online!Try it online!

Slightly inferior toThanks @LuisMendo for saving 3 byes, so now it has the same bytecount as @flawr's answer, but sufficiently different to post anyway. High-level agorithm overview:

 Z}&OZ"                  % Create n x m matrix of zerosspaces
             (         % Index into this matrix:
     i                 %  The alphabet vermicelli (explicit input)
          &Z@          %  at a random locations (randperm), which are
        yn             %   length(S) numbers, ranging
t     bp               %   from 1 to n*m
             TT35&Ya TT35&Yac % And finally add a border
      

MATL, 22 bytes

tZ}&Oibpyn&Z@(TT35&Yac

Try it online!

Slightly inferior to @flawr's answer, but sufficiently different to post anyway. High-level agorithm overview:

 Z}&O                  % Create n x m matrix of zeros
             (         % Index into this matrix:
     i                 %  The alphabet vermicelli (explicit input)
          &Z@          %  at a random locations (randperm), which are
        yn             %   length(S) numbers, ranging
t     bp               %   from 1 to n*m
              TT35&Yac % And finally add a border
      

MATL, 19 bytes

tZ"ibpyn&Z@(TT35&Ya

Try it online!

Thanks @LuisMendo for saving 3 byes, so now it has the same bytecount as @flawr's answer, but sufficiently different to post anyway. High-level agorithm overview:

 Z"                  % Create n x m matrix of spaces
           (         % Index into this matrix:
   i                 %  The alphabet vermicelli (explicit input)
        &Z@          %  at a random locations (randperm), which are
      yn             %   length(S) numbers, ranging
t   bp               %   from 1 to n*m
            TT35&Ya  % And finally add a border
      
Source Link
Sanchises
  • 9.5k
  • 1
  • 36
  • 61

MATL, 22 bytes

tZ}&Oibpyn&Z@(TT35&Yac

Try it online!

Slightly inferior to @flawr's answer, but sufficiently different to post anyway. High-level agorithm overview:

 Z}&O                  % Create n x m matrix of zeros
             (         % Index into this matrix:
     i                 %  The alphabet vermicelli (explicit input)
          &Z@          %  at a random locations (randperm), which are
        yn             %   length(S) numbers, ranging
t     bp               %   from 1 to n*m
              TT35&Yac % And finally add a border