text:
Date Multiplying Challenge
(Inspired by last week's Riddler on FiveThirtyEight.com. Sandbox post.)
Given a year between 2001 and 2099, calculate and return the number of days  during that calendar year where mm * dd = yy (where yy is the 2-digit year).
2018, for example, has 5:

January 18th (1 * 18 = 18)
February 9th (2 * 9 = 18)
March 6th (3 * 6 = 18)
June 3rd (6 * 3 = 18)
September 2nd (9 * 2 = 18)

Input can be a 2 or 4-digit numeric year.
Output should be an integer. Optional trailing space or return is fine.
Complete input/output list:
Input = Output
 2001 = 1     2021 = 3     2041 = 0     2061 = 0     2081 = 2
 2002 = 2     2022 = 3     2042 = 4     2062 = 0     2082 = 0
 2003 = 2     2023 = 1     2043 = 0     2063 = 3     2083 = 0
 2004 = 3     2024 = 7     2044 = 3     2064 = 2     2084 = 5
 2005 = 2     2025 = 2     2045 = 3     2065 = 1     2085 = 1
 2006 = 4     2026 = 2     2046 = 1     2066 = 3     2086 = 0
 2007 = 2     2027 = 3     2047 = 0     2067 = 0     2087 = 1
 2008 = 4     2028 = 4     2048 = 6     2068 = 1     2088 = 3
 2009 = 3     2029 = 1     2049 = 1     2069 = 1     2089 = 0
 2010 = 4     2030 = 6     2050 = 3     2070 = 3     2090 = 5
 2011 = 2     2031 = 1     2051 = 1     2071 = 0     2091 = 1
 2012 = 6     2032 = 3     2052 = 2     2072 = 6     2092 = 1
 2013 = 1     2033 = 2     2053 = 0     2073 = 0     2093 = 1
 2014 = 3     2034 = 1     2054 = 4     2074 = 0     2094 = 0
 2015 = 3     2035 = 2     2055 = 2     2075 = 2     2095 = 1
 2016 = 4     2036 = 6     2056 = 4     2076 = 1     2096 = 4
 2017 = 1     2037 = 0     2057 = 1     2077 = 2     2097 = 0
 2018 = 5     2038 = 1     2058 = 0     2078 = 2     2098 = 1
 2019 = 1     2039 = 1     2059 = 0     2079 = 0     2099 = 2
 2020 = 5     2040 = 5     2060 = 6     2080 = 4

This is a code-golf challenge, lowest byte count in each language wins.
Pre-calculating and simply looking up the answers is normally excluded per our loophole rules, but I'm explicitly allowing it for this challenge. It allows for some interesting alternate strategies, although its not likely a 98 99-item lookup list is going to be shortest.

If it makes it any easier in your language, the answer will be the same regardless of century; 1924 and 2124 have the same number of days as 2024.

if the the result of mm*dd is bigger than 100 it is automatically filtered?

@DanielIndie Correct, no "wraparound" dates should be counted. In other words, Dec 12, 2044 doesn't count, even though 12 * 12 = 144.

As we need only handle a limited number of inputs, I've edited them all in. Feel free to rollback or reformat.

I believe 2078 should be 2 and 2087 should be 1

@Arnauld Oops, off-by-one error. Same reason I submitted the wrong answer on the original 538.com puzzler.

That's fine, @Shaggy, I fixed the errors mentioned by Asone (which I also verified).

Does Input can be a 2 or 4-digit numeric year mean that the submitter can decide or that the program needs to accept both as valid?

@gwaugh Just that you can decide which to accept as valid input (so you don't have to spend extra characters converting between the two).

Excel, 48 bytes
Hooray! Finally something Excel is actually good at.
=COUNT(VALUE(ROW(1:12)&"/"&A1/ROW(1:12)&"/"&A1))

Takes input from A1 in the form of an integer 1-99 representing the year, and outputs to wherever you enter this formula. It's an array formula, so use Ctrl-Shift-Enter instead of Enter to enter it.
This takes advantage of the fact that COUNT ignores errors, so any errors that are caused by either the month not dividing the year (leading Excel to parse something like 2/12.5/25 or by the date not being valid, like 2/29/58, are just silently ignored.

Very nice. Probably worth mentioning it requires a 2-digit year in A1. Entering a 4-digit year simply returns 0.

True! I'll edit that into the description.

Also I should mention that it's locale-specific; it depends on having a locale that uses a mm/dd/yy ordering. In a locale with dd/mm/yy ordering, the answer would be the same number of bytes, of course.

Super clever; I like how you're only testing 12 date candidates (one per month), instead of running through every day of the year.

Fix the year to a non-leap one save byte?

Python 2, 44 bytes
[k/32%13*(k%32)for k in range(96,509)].count

Try it online!
An anonymous function given as a method object. Produces all products of (month, day) pairs (m, d) as encoded by k=32*m+d with 0≤m≤12, 0≤d≤31, wrapping around. Eliminates Feb 29-31 by excluding them from the range.

Java (JDK 10), 65 bytes
y->{int m=13,c=0;for(;m-->1;)if(y%m<1&y/m<29+m%2*3)c++;return c;}

Try it online!
Credits

8 bytes saved thanks to l4m2.
4 bytes saved thanks to Asone Tuhid on their Ruby answer.

No leap year fits 29*n, so no need the check

Thanks for your input. I could remove 27 bytes in total with a bunch of other changes.

Changing (m==2?29:32) to 29+m%2*3 still seems to give all OK results. Credit to @AsoneTuhid's Ruby answer.

PowerShell, 94 bytes
param($a)for($x=Date 1/1/$a;$x-le(Date 12/9/$a);$x=$x.AddDays(1)){$z+=$x.Month*$x.Day-eq$a};$z

Try it online!
Takes input as a two-digit year, then constructs a for loop from 1/1/year to 12/9/year (because 12/10 and beyond will never count and this saves a byte). Each iteration, we increment $z iff the .Month times the .Day is equal to our input year. Outside the loop, $z is left on the pipeline and output is implicit.
Edit - this is culture dependent. The above code works for en-us. The date format may need to change for other cultures.

"culture"? Did you mean "locale"? ...

@user202729 Colloquially, yes, but PowerShell documentation refers to it as "culture."

"Culture" is the word MS generally uses to talk about locale, eg. System.Globalization.CultureInfo in .NET.

JavaScript (Node.js), 48 44 43 bytes
F=(x,h)=>h>12?0:F(x,-~h)+(x/h<3*h%6+28>x%h)

Try it online!
JavaScript (Node.js), 59 58 bytes
x=>[a=0,...'030101001010'].map((k,m)=>x%m|x/m>31-k||a++)|a

Try it online!

I knew a mathematical solution would be short, but I had fun with my version :)

Ruby, 46 42 bytes
->y{(1..12).count{|j|y%j<1&&y/j<29+j%2*3}}

Try it online!

JavaScript, 91 85 82 81 77 bytes
Takes input as a 2-digit string (or a 1 or 2 digit integer).
Takes advantage of the fact that new Date will rollover to the next month, and continue doing so, if you pass it a day value that exceeds the number of days in the month you pass to it so, on the first iteration, it tries to construct the date yyyy-01-345 which becomes yyyy-12-11, or yyyy-12-10 on leap years. We don't need to check dates after that as 12*11+ results in a 3-digit number.
y=>(g=d=>d&&([,M,D]=new Date(y,0,d).toJSON().split(/\D/),D*M==y)+g(--d))(345)

3 bytes saved thanks to Arnauld.

Test It

f=
y=>(g=d=>d&&([,M,D]=new Date(y,0,d).toJSON().split(/\D/),D*M==y)+g(--d))(345)
o.innerText=[...Array(99)].map((_,x)=>(2001+x++)+` = `+f(x)).join`\n`
pre{column-count:5;width:480px;}

Jelly, 15 bytes
31x12_2¦3RĖP€Fċ

Try it online!
Take a number in range [0,100[ as input.

JavaScript (ES6), 91 bytes
I was curious to know how hardcoding would compare to an iterative computation. It's definitely longer (see @Shaggy's answer), but not awfully longer.
Edit: It is, however, much longer than a more direct formula (see @l4m2 answer).
Takes input as an integer in [1..99].
n=>(k=parseInt('8ijkskercdtbnqcejh6954r1eb2kc06oa3936gh2k0d83d984h'[n>>1],36),n&1?k>>3:k&7)

Try it online!
How?
Odd years have significantly less chance of having mm * dd = yy than even years. More concretely, odd years have 0 to 3 matches, while even years have 0 to 7 matches. This allows us to code each pair of years with just 5 bits, which can conveniently be represented as a single character in base 36.

Bash + GNU utilities, 57

1 byte saved thanks to @SophiaLechner

seq -f1/1/$1+%gday 0 365|date -f- +%m*%d-%y|bc|grep -c ^0

Note that the seq command always produces a list of 366 dates - for non-leap years January 1st of the next year will be included.  However in the date range 2001..2099, MM*DD will never be YY for January 1st of the next year for any of these years, so this extra day won't affect the result.
Try it online!

Very nice - I hadn't even known date will do date math like that while parsing. seq doesn't need a space after the -f, so you can save a byte there.

Python 2 and 3, 55 52 bytes
lambda y:sum(y%i<(y/i<29+i%2*3)for i in range(1,13))

Try it online!

Perl 6, 40 bytes
{+grep {$_%%$^m&&29+$m%2*3>$_/$m},1..12}

Try it online!

T-SQL, 123 121 bytes
Per our IO rules, input is taken via pre-existing table t with an integer field y, which contains a 2-digit year.
WITH c AS(SELECT 1m UNION ALL SELECT m+1FROM c WHERE m<12)
SELECT SUM(ISDATE(CONCAT(m,'/',y/m,'/',y)))FROM c,t WHERE y%m=0

Line break is for readability only. Inspired largely by Sophia's Excel solution.

The top line generates a 12-item number table c which is joined to the input table t.
If that passes I mash together a date candidate using CONCAT(), which does implicit varchar datatype conversions. Otherwise I'd have to do a bunch of CAST or CONVERT statements.
Found the perfect evaluation function ISDATE(), which returns 1 for valid dates and 0 for invalid dates.
Wrap it in a SUM and I'm done.
EDIT: Moved the integer division check (y%m=0) into the WHERE clause to save 2 bytes, thanks @RazvanSocol.

Unfortunately, it's not much shorter than the lookup table version (using the string from osdavison's version):
T-SQL lookup, 129 bytes
SELECT SUBSTRING('122324243426133415153317223416132126011504033106131204241006003213011306002122042005101305111014012',y,1)FROM t

EDIT: Leaving my original above, but we can save a few bytes by using a couple of new functions:

STRING_SPLIT is available in MS SQL 2016 and above.
CONCAT_WS is available in MS SQL 2017 and above.
As above, replaced IIF with WHERE

MS-SQL 2017, 121 118 bytes
SELECT SUM(ISDATE(CONCAT_WS('/',value,y/value,y)))
FROM t,STRING_SPLIT('1-2-3-4-5-6-7-8-9-10-11-12','-')
WHERE y%value=0

MS-SQL 2017, extra cheaty edition: 109 bytes
SELECT SUM(ISDATE(CONCAT_WS('/',number,y/number,y)))
FROM t,spt_values WHERE number>0AND y%number=0AND'P'=TYPE

Requires you to be in the master database, which contains a system table spt_values that (when filtered by TYPE='P'), gives you counting numbers from 0 to 2048.

Similar to other answers, the order I assemble the date (m/d/y) depends on the locality settings of the SQL instance. Other localities might require a different order, or a different separator, but I don't think would impact the code length.

I guess you realized that converting '2/29/64' to a date gives 1964-02-29 (not 2064-02-29), but considering that the years 2000 and 2100 are excluded, it's a nice way to get a shorter code.

Using SPLIT_STRING instead of a CTE brings it down to 120 bytes. Using CONCAT_WS instead of CONCAT saves another character, getting it to 119 bytes.

@RazvanSocol Yeah, I'm not sure where the break is between 2-digit dates that map to 19xx vs 20xx, but both give the same answer. I'll give the other two suggestions a try, thanks!

@RazvanSocol See my edit, best I could get from those functions was 121, how did you get 119? The length of value is really holding us back.

Replace IIF with WHERE.

@RazvanSocol Thanks, that worked. I can save even more by using spt_values, but that's kinda cheaty.

Julia 0.6, 49 44 42 bytes
y->sum(y/i∈1:28+3(i%2⊻i÷8)for i=1:12)

Try it online!
-5 bytes inspired by Asone Tuhid's Ruby answer.
-2 bytes replacing count with sum
Explanation:
For each month i from 1 to 12, calculate y/i, and check if it's one of that month's days. Months with 31 days are 1, 3, 5, 7, 8, 10, 12 - so they're odd below 8 and even at and above 8. So either i%2 or i÷8 (which is 0 for i<8 and 1 for i>=8 here) should be 1, but not both - so we XOR them. If the xor result is true, we check dates 1:28+3 i.e. 1:31, otherwise we check just dates 1:28.
1:28 is sufficient for the rest of the months (this improvement inspired by Asone Tuhid's Ruby answer) because:

for February, the only possibility would have been 2*29 = 58, but 2058 is not a leap year, so we can assume Feb always has 28 days.
the other months with 30 days are month 4 and above - for which i*29 (and i*30) would be above 100, which can be ignored.

Finally, we count out the number of times y/i belongs in this list of days (by using boolean sum here), and return that.

Python 2, 89 84 68 58 bytes
f=lambda y,d=62:d-59and((d/31+1)*(d%31+1)==y)+f(y,-~d%372)

Try it online!

Excel, 83 bytes
{=SUM(IF(MONTH(DATE(A1,1,0)+ROW(1:366))*DAY(DATE(A1,1,0)+ROW(1:366))=A1-2000,1,0))}

Input is in cell A1 in the format yyyy. This is an array formula and is entered with Ctrl+Shift+Enter to get the curly brackets {}. It is fairly straightforward and without any cleverness.
When in an array formula, DATE(A1,1,0)+ROW(1:366) gives us an array of 366 date values. On non-leap years, this will include Jan 1 of the next year but that is not a problem because 1*1=1 and would only count as a false positive if the next year is 2001 but, since the required year range is 2001 - 2099, it will never arise as an issue.
If you shorted that bit into simply ~, the formula because much easier to follow:
{=SUM(IF(MONTH(~)*DAY(~)=A1-2000,1,0))}

I tried using COUNTIF() instead of SUM(IF()) but Excel wouldn't even let me enter it as an array formula, much less give me a result. I did find a Google Sheets solution using CountIf() but the same method otherwise that turned out to be 91 bytes, mostly because it uses ArrayFormula() instead of simply { }.
=CountIf(ArrayFormula(Month(Date(A1,1,0)+Row(1:366))*Day(Date(A1,1,0)+Row(1:366))),A1-2000)

I haven't seen a consensus, but I've generally not been including the outer curly brackets in my byte counts for Excel. They feel more like a way that Excel is formatting its display than part of the formula. Opinions?

@SophiaLechner I've included them instead of deciding how to include the extra keystrokes required to enter it as an array formula. There's a meta question about that and the only answer says that the CTRL+ALT+ENTER command would count as 1 keystroke. If you use the same as vim (per meta), then that keystroke would count as 1 byte. However, I don't usually count the ENTER at the end of entering a formula as 1 byte in other answers.

Python 3, 158 162 215 241 bytes
Removed 4 Thanks to Stephen for golfing the conditionals.
Removed 53 thanks Stephen for pointing out the white space
Removed 26 thanks to the link provided by caird
I'm pretty new at this. Couldn't think of how to do this without having the days in a month be described.
r=range
def n(Y):
 a,b,c=31,30,0
 for x in r(12):
  for y in r([a,(28if Y%4else 29),a,b,a,b,a,a,b,a,b,a][x]):
   if(x+1)*(y+1)==int(str(Y)[2:]):c+=1
 return c

Try it online!

Welcome to the site, and nice first post! There are a fair few ways you can golf this, such as removing some whitespace, so be sure to check out these tips for golfing in Python

@cairdcoinheringaahing Thanks for the advice the link was very useful!

158 bytes - golfed some away, but mostly you had a big long line of spaces on your third line, dunno how those got there

@Stephen Thanks :) I added yours as two edits. One for the white space and the other as the golfing.

(28if Y%4else 29) can be shortened to [29,28][Y%4>0]. Also, the long list can be shortened to [a,...]+2*[a,b,a,b,a]. a,b,c can be added in the parameter list to save a line. int(str(Y)[2:]) can be shortened to Y%100. Finally, counter variables can mostly be shortened to lens of list comprehensions, this also allows n to be made a lambda. This makes 118.

Forth (gforth), 60 59 bytes
: f 0 13 1 do over i /mod swap 32 i 2 = 3 * + 0 d< - loop ;

Try it online!
This version takes advantage of the fact that there can't be more than 1 matching day per month, and that the year has to be divisible by the month for it to match.
Explanation
Iterates over the months, checks if year is divisible by month, and if the quotient is < 31 (28 for Feb) Months after March can't match for days greater than 25, so we can just assume all months (other than Feb) have 31 days for the purpose of the puzzle.
Code Explanation
: f                   \ start new word definition
  0                   \ set up counter
  13 1 do             \ start a counted loop from 1 to 12
    over i /mod       \ get the quotient and remainder of dividing year by month
    swap              \ default order is remainder-quotient, but we want to swap them
    32 i 2= 3 * +     \ we want to compare to 32 days unless month is Feb
    0 d<=             \ treat the 4 numbers on the stack as 2 double-length numbers
                      \ and compare [1]
    -                 \ subtract result from counter (-1 is true in Forth)
  loop                \ end loop
;                     \ end word definition

[1] - Forth has the concept of double length numbers, which are stored on the stack as two single-length numbers (of the form x y, where the value of the double = y * 2^(l) + xwhere l is the size in bits of a single in the forth implementation you're working with).
In this case, I compared the quotient and remainder to 32 (or 29) 0. If the remainder was greater than 0 (year not divisble by month), the first double would be automatically bigger than 32 (or 29) 0 and the result would be false. If the remainder is 0, then it resolves to effectively a regular check of quotient <= 32 (or 29)
Forth (gforth), 61 bytes
: f 0 13 1 do i 2 = 3 * 32 + 1 do over i j * = - loop loop ;

Try it online!
Saved some bytes by realizing that only February matters in terms of having the correct number of days in the month
Explanation
Forth (at least gforth) comparisons return -1 for true and 0 for false
0                     \ place 0 on top of the stack to use as a counter
13 1 do               \ begin the outer loop from 1 to 12
  i 2 = 3 *           \ if i is 2 place -3 on top of the stack, otherwise 0
  32 + 1 do           \ begin the inner loop from 1 to 31 (or 28)
    over              \ copy the year from stack position 2 and place it on top of the stack
    i j * = -         \ multiply month and day compare to year, subtract result from counter
  loop                \ end the inner loop
loop                  \ end the outer loop

Retina 0.8.2, 55 bytes
..
$*
(?<=^(1{1,12}))(?=(?(?<=^11$)\1{0,27}|\1{0,30})$)

Try it online! Takes a two-digit year; add 1 byte to support 4-digit years. Explanation: The first stage simply converts to unary. The second stage starts by matching 1 to 12 characters before the match position, representing the month, and then attempts to look ahead for a whole number of repetitions of that month. However, the lookahead contains a conditional, which chooses between up to 27 or 30 further repetitions depending on the month. The count of match positions is then the desired result.

C (gcc), 65 60 59 bytes
d(a,t,e){for(t=0,e=13;e-->1;)t+=a%e<1&a/e<(e-2?32:29);a=t;}

Port of user202729's Java answer. Try it online here. Thanks to Jonathan Frech for golfing 1 byte.

a=0,m=13;for(; ~> for(a=0,m=13;.

@JonathanFrech Thanks for pointing that out, I have edited.

R, 22 122 bytes
x=scan();substr("122324243426133415153317223416132126011504033106131204241006003213011306002122042005101305111014012",x,x)

Try it online!
Decided to go with a lookup table approach. Input year needs to be 2 digits.

Also on TIO you can hit the "link" button and it will auto-format the answer for you. Thanks to Dennis for setting it up!

You can remove the initial if, since input can be either 2-digit or 4-digit, your choice (so you can choose to accept only 2-digit input). But it looks like the code considers every month to contain 31 days, so for eg., 62 (for 2062) returns 1 where it should return 0.

I misunderstood. That being said, I'm pretty sure the lookup table would have to be included in the byte count.

@ngm I also was not sure if the lookup table needed to be included, but I will add it to the byte count just to be safe.

I'm still not sure what all the rules are!

J, 29 bytes
1#.(,x*i."+29+3*2~:x=.i.13)=]

Try it online!
How it works
1#.(,x*i."+29+3*2~:x=.i.13)=]    Input: year (2-digit, 1..99)
                   x=.i.13       array of 0..12; assign to x
                2~:              1 1 0 1 .. 1
              3*                 3 3 0 3 .. 3
           29+                   32 32 29 32 .. 32
       i."+                      for each item of above, generate a row 0 .. n
    ,x*                          each row times 0 .. 12 and flatten
                           =]    1 for each item == input, 0 otherwise
1#.                              sum

Tried hard to get under 2 times Jelly solution :)
Side note
If someone really wants to hardcode the 99-digit data, here's a bit of information:
Divide the 99-digit into chunks of 2 digits. Then the first digit is <4 and the second <8, which means five bits can encode two numbers. Then the entire data can be encoded in 250 bits, or 32 bytes.

Java (JDK 10), 79 72 70 bytes
y->{int a=0,m=13;for(;m-->1;)a+=y%m<1&&y/m<(m==2?29:32)?1:0;return a;}

Try it online!

@Shaggy Thanks! (leftover from previous version where I loop over all days)

If you change && to & it's the same answer as OlivierGrégoire's Java answer, although he has answered 19 minutes earlier.

@KevinCruijssen Random coincidence. Although my version is a bit worse (unnecessary use of ternary).

Haskell, 61 51 bytes
f y=sum[1|i<-[96..508],mod(div i 32)13*mod i 32==y]

Try it online!
Inspired by xnor's Python 2 answer and Laikoni.

52 bytes: f y=sum[1|i<-[1..12],mod y i<1,div y i<29+mod i 2*3] Try it online!

JavaScript (Node.js), 108 bytes
a=>'0122324243426133415153317223416132126011504033106131204241006003213011306002122042005101305111014012'[a]

f=a=>'0122324243426133415153317223416132126011504033106131204241006003213011306002122042005101305111014012'[a]
o.innerText=[...Array(99)].map((_,x)=>(2001+x++)+` = `+f(x)).join`\n`
pre{column-count:5;width:480px;}

Brute-force lookup, nice!

Welcome to PPCG!

Perl 5, 68 bytes
//;map$\+=$'%++$m==0&&$'/$m<$_,32,29,32,31,32,31,32,32,31,32,31,32}{

Try it online!

Python 3, 132 bytes
This is really quite long of a program but I thought it might be of interest.
All the values are between 0-7 so I encode each number with 3 bits in a long binary string. I tried pasting a raw binary string into my python program but I couldn't get it to work, so I settled on base64 in the file.
I used the following string as a lookup table (ending 7 used for padding):
01223242434261334151533172234161321260115040331061312042410060032130113060021220420051013051110140127
The program takes this string and decodes it as a number, then uses bit shifting to extract the result.
import base64
lambda n:int.from_bytes(base64.b64decode(b'pNRRxYtw01s9Jw4tFYE0QNkYsoRQgYBosEsYBFIRAUgsUkgwFQM='),'big')>>(6306-3*n)&7

66 bytes + 37 byte file = 103 bytes
This reads a binary file called e and avoids using base64.
lambda n:int.from_bytes(open('e','rb').read(),'big')>>(6306-3*n)&7

Here is a hexdump of the read file (without padding):
00000000  a4 d4 51 c5 8b 70 d3 5b  3d 27 0e 2d 15 81 34 40  |..Q..p.[='.-..4@|
00000010  d9 18 b2 84 50 81 80 68  b0 4b 18 04 52 11 01 48  |....P..h.K..R..H|
00000020  2c 52 48 30 0a                                    |,RH0.|

Oracle SQL, 115 bytes
select count(decode(sign(decode(l,2,29,32)-y/l),1,1))from t,
xmltable('1to 12'columns l int path'.')where mod(y,l)=0

We may note that it does not really matter how many days in April (and later months), since 100/4 < 28. Also it's not necessary to check whether year is leap or not.
We just have to specify that there are 28 days in February (not 29 because that validation will be executed only for 2058 which is not leap) otherwise it may be just 31 for any month.
Other approaches
Oracle SQL (12c Release 2 and later), 151 bytes
select count(to_date(y/l||'-'||l||'-1' default '' on conversion error,'dd-mm-y'))from t,
(select level l from dual connect by level<=12)where mod(y,l)=0

Oracle SQL (12c Release 2 and later), 137 bytes
select sum(validate_conversion(y/l||'-'||l||'-1'as date,'dd-mm-y'))from t,
(select level l from dual connect by level<=12)where mod(y,l)=0

Both solution could have been 8 bytes shorter if we replace (select level l from dual connect by level<=12) with xmltable('1to 12'columns l int path'.') but Oracle throws an exception because of the bug (tested on versions 12.2.0.1.0, 18.3.0.0.0).
SQL> select count(to_date(y/l||'-'||l||'-1' default '' on conversion error,'dd-mm-y'))from t,
  2  xmltable('1to 12'columns l int path'.')where mod(y,l)=0
  3  /
select count(to_date(y/l||'-'||l||'-1' default '' on conversion error,'dd-mm-y'))from t,
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected DATE got DATE

SQL> select sum(validate_conversion(y/l||'-'||l||'-1'as date,'dd-mm-y'))from t,
  2  xmltable('1to 12'columns l int path'.')where mod(y,l)=0
  3  /
select sum(validate_conversion(y/l||'-'||l||'-1'as date,'dd-mm-y'))from t,
*
ERROR at line 1:
ORA-43909: invalid input data type

The only case in both solution when year does matter is 2058 which is non-leap so literal '-1' was used to specify non-leap year.
Oracle SQL, 128 bytes
select count(d)from t,(select date'1-1-1'+level-1 d from dual connect by level<365)
where to_char(d(+),'mm')*to_char(d(+),'dd')=y

Oracle SQL, 126 bytes
select substr('122324243426133415153317223416132126011504033106131204241006003213011306002122042005101305111014012',y,1)from t

Update
Oracle SQL, 110 bytes
select-sum(least(sign(y/l-decode(l,2,29,32)),0))from t,
xmltable('1to 12'columns l int path'.')where mod(y,l)=0

Oracle SQL, 108 bytes
select sum(decode(sign(decode(l,2,29,32)-y/l)*mod(y+1,l),1,1))from t,
xmltable('1to 12'columns l int path'.')

Spark SQL, 137 bytes
select count(cast(regexp_replace(concat_ws('-','2001',l,y/l),'.0$','')as date))
from(select explode(array(1,2,3,4,5,6,7,8,9,10,11,12))l),t

Spark 2.3+ SQL, 126 bytes
(replace function becomes available)
select count(cast(replace(concat_ws('-','2001',l,y/l),'.0')as date))
from(select explode(array(1,2,3,4,5,6,7,8,9,10,11,12))l),t

PHP, 73 bytes
Using pipe input and php -nR:
for(;++$m<13;$d=1)while($d<25+($m-2?$m>4?:7:4))$c+=$argn==$m*$d++;echo$c;

Try it online!
PHP, 76 bytes
Using command line arg input php dm.php 18:
for(;++$m<13;$d=1)while($d<25+($m-2?$m>4?:7:4))$c+=$argv[1]==$m*$d++;echo$c;

Try it online!
Iterative approach.  Since the only leap year to look at is 2 * 29 = 58, and 2058 is not a leap year there's no need to consider leap year in the Feb days.  And since wraparound is not a concern -- from April on, any day greater than 25 will exceed 100 we just say the rest of the months only have 25 days.
Input is 2 digit year via command line (-10 bytes as program, thx to suggestion from @Titus).
OR:
PHP, 101 bytes
$y=$argv[1];for($d=strtotime("$y-1");date(Y,$d)==$y;$d+=86400)eval(date("$\x+=j*n=='y';",$d));echo$x;

Try it online!
Still iterative but using PHP's timestamp functions.  Accepts year as four digit number.  Thx to @Titus for suggestion of using strtotime() instead of mktime().

First version fails for 4-digit years, second fails for two-digit. But nice thinking. Try $m<5?$m-2?31:28:25 for the first and $d=strtotime("$y-1") for the second

Uhm ... Why did you put the y in the eval in quotes?

@Titus because PHP7 now treats digits preceeded with 0 as octal, so 08 and 09 are actually not valid. https://tio.run/##K8go@G9jXwAkU5Mz8hUMFWxtFQwsrP//BwA  Using the date() function you can only get a 2 digit, zero-padded year.

Bummer! of course.

I underestimated the mktime function. two digits are ok for second; but Input can be a 2 or 4-digit numeric year. doesn´t mention it´s your choice. Btw you may want to submit programs; they´re usually shorter than functions.

@Titus, updated second version using strtotime() instead of mktime() and re-implemented as program, -7 bytes.  Also, I looked at the majority of the submissions, including the top voted ones, will only accept year as either 2 or 4 digits, so I'm going to take that to mean it is up to submitter. Thx again for the suggestions!

Japt -x, 18 bytes
Takes input as an integer in the range 1-99.
346Ç=ÐUTZ)f *ÒZÎ¥U

Try it
As with my JS solution, takes advantage of the fact that JavaScript's Date will rollover to the next month, and continue doing so, if you pass it a day value that exceeds the number of days in the month you pass to it so, on the first iteration, ÐUTZ tries to construct the date yyyy-01-345 which becomes yyyy-12-11, or yyyy-12-10 on leap years. We don't need to check dates after day 345 that as 12*11+ results in a 3-digit number.
346Ç=ÐUTZ)f *ÒZÎ¥U     :Implicit input of integer U
346Ç                   :Map each Z in the range [0,346)
    =                  :  Reassign to Z
     ÐUTZ              :    new Date(U,0,Z) - months are 0-indexed in JS
         )             :  End reassignment
          f            :  Get the day of the month
            *Ò         :  Multiply by the negation of bitwise NOT of
              ZÎ       :  Get 0-based month of Z
                ¥U     :  Test for equality with U
                       :Implicitly reduce by adition and output

PHP, 74 70 bytes
while(++$m<13)for($d=$m<5?$m-2?31:28:25;$d;)$n+=$d--*$m==$argn;echo$n;

accepts two-digit years only.
I adopted gwaugh´s considerations and golfed them; my 1st approach was longer than his (92 bytes):
for($y=$argn%100;++$m<13;)for($d=$m-2?30+($m+$m/8)%2:29-($y%4>0);$d;)$n+=$d--*$m==$y;echo$n;

%100 allows to use 4-digit years.

Run as pipe with -nR or try them online.

You can save 4 bytes by removing the %100 and only taking 2 digit input, which is OK: https://codegolf.stackexchange.com/questions/162137/date-multiplying-challenge/179446#comment432764_162137


text:
+- knapsack problem
Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.
Wikipedia for more information
For example you can be given a max weight of 15 and objects with value/masses as [5,2], [7,4] [1,1] and you would output [7,0,1] which is 7 [5 <value>, 2 <mass>] objects and 1 [1 <value>, 1 <mass>] object for a score of 36.
Rules
Input can be taken in any reasonable format
Output is also flexible format,
You may not use libraries that are non-standard. If you have to install or download any library to use it separate from the initial setup then it is not allowed
Objects may have negative mass and value (i.e -1,-1)
Optimal answers required
Winning
Shortest code wins
Negative mass and value?
This is a key part of this challenge. Lets say you have a object with items (mass, value) such as [4,3],[-1,-1] and a bag with capacity of 15. You could put 3 of the first ones and score 9 or put 4 of the first ones and one of the -1,-1 object for a score of 11.

sandbox

Can we assume that no object will have non-positive mass?

@HyperNeutrino one sec removing for edits

They may have negative mass and value

Can we assume everything is an integer?  Also, will we have to deal with cases like [[2, 1], [-1, -1]] where the total value can be made arbitrarily large?

@Mnemonic all ints, there will be no arbitralily large cases

Related

I think that there is a mistake in the last paragraph: 4*4-1=15, which is more than 13.

The title is misleading. Due to negative weights this is not the knapsack problem but a variation on the linear programming problem.

Again in the last paragraph: the score would be 11 (not 15) but the total mass would be 15, above the capacity which is 13.

@raz opps fixed

Pyth, 18 bytes
h.MshMZfghQseMTy*F

Outputs as a list of [value, weight] pairs.  Horrendously inefficient, but it is NP-complete.
Try it here
Explanation
h.MshMZfghQseMTy*F
               y*FQ  Get all sets with up to <capacity> of each item.
       fghQseMT      Choose the sets whose total weight fits in the bag.
 .MshMZ              Choose those with the highest value.
h                    Take the first.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Make a Word Icicle
Due to technical limitations of Stack Exchange, the title is rendered incorrectly. The correct title for this challenge is
Make a
Word Icicle!
Word Icicle
Word  cicle
 ord  cicle
 ord   icle
 ord   i le
 or    i le
 or    i l
 or      l
 or
  r

Today's challenge is to make icicles out of the input word. Given a string of entirely printable ASCII, and at least 2 non-space characters, perform the following steps:

Print the current state of the string.
Replace the lexically smallest character (other than spaces) with a space. If there is a tie, replace the leftmost character.
Repeat on consecutive lines until the string contains only 1 non-space character.

This creates the effect that the input string looks like it's melting...
I'm Melting!!!
I'm Melting !!
I'm Melting  !
I'm Melting
I m Melting
  m Melting
  m  elting
  m   lting
  m   ltin
  m   lt n
  m    t n
       t n
       t

Rules

After a couple iterations, your output will almost surely have trailing spaces on each line. If you choose to truncate these, that is allowed.
You may have one trailing empty line, but not more.
Remember that the input may contain several spaces, but these are all effectively skipped. For example, the input a     a should give
a      a
       a

You may take input as a list of strings if you want. For output, you may return or print a list of strings, a single string with newlines, or char matrix/2D array. Generally, I prefer permissive IO formats, so other formats are most likely allowed as long as they are consistent and clearly correspond to the right output. If in doubt, feel free to ask. As usual, full programs or functions are allowed.
Remember, this is a contest to make the shortest answer in any language! If you choose to answer in Java, try to make the shortest Java answer (in bytes) that you can.

Test cases
Hello World! -->

Hello World!
Hello World
 ello World
 ello  orld
 ello  orl
  llo  orl
   lo  orl
    o  orl
    o  or
       or
        r

AbCdEfGhIjKlMnOpQrStUvWxYz -->

AbCdEfGhIjKlMnOpQrStUvWxYz
 bCdEfGhIjKlMnOpQrStUvWxYz
 b dEfGhIjKlMnOpQrStUvWxYz
 b d fGhIjKlMnOpQrStUvWxYz
 b d f hIjKlMnOpQrStUvWxYz
 b d f h jKlMnOpQrStUvWxYz
 b d f h j lMnOpQrStUvWxYz
 b d f h j l nOpQrStUvWxYz
 b d f h j l n pQrStUvWxYz
 b d f h j l n p rStUvWxYz
 b d f h j l n p r tUvWxYz
 b d f h j l n p r t vWxYz
 b d f h j l n p r t v xYz
 b d f h j l n p r t v x z
   d f h j l n p r t v x z
     f h j l n p r t v x z
       h j l n p r t v x z
         j l n p r t v x z
           l n p r t v x z
             n p r t v x z
               p r t v x z
                 r t v x z
                   t v x z
                     v x z
                       x z
                         z

PPCG is da BEST -->

PPCG is da BEST
PPCG is da  EST
PP G is da  EST
PP G is da   ST
PP   is da   ST
 P   is da   ST
     is da   ST
     is da    T
     is da
     is d
     is
      s

({({})({}[()])}{}) -->

({({})({}[()])}{})
 {({})({}[()])}{})
 { {})({}[()])}{})
 { {}) {}[()])}{})
 { {}) {}[ )])}{})
 { {}  {}[ )])}{})
 { {}  {}[  ])}{})
 { {}  {}[  ] }{})
 { {}  {}[  ] }{}
 { {}  {}   ] }{}
 { {}  {}     }{}
   {}  {}     }{}
    }  {}     }{}
    }   }     }{}
    }   }     } }
        }     } }
              } }
                }

"lexically smallest" means by code point?

@Giuseppe Yes, the character with the smallest ASCII code point (other than space obviously)

Reminds me of another challenge where we had to, I think, vertically repeat a character by its index in the alphabet.

@Shaggy You're probably thinking of Make some Alphabet Rain.

That's the very one, @Rainbolt.

Also somewhat related

That reference to MediaWiki though...

I am assuming it would be, but just to make sure: is an input string starting with a space valid?

@Jonathan Yes, the input may contain leading/trailing spaces.

Kind of related

Retina, 28 bytes
/\S/+¶<~(O`.
0L$`\S
0`$\$&¶

Try it online!Explanation:
/\S/+

Repeat while the input value isn't blank.
¶<

Print the current value.
~(

Execute the rest of the script on the value. Then, execute the result of that script as a script on the value.
O`.

Sort the characters into order.
0L$`\S
0`$\$&¶

Select the first nonblank character and output a Retina program that replaces the first literal ($\) occurrence of that character ($&) with a space (trailing space in original code).

Python 2, 71 70 bytes
-1 byte thanks to ovs

x=input()
while x.strip():print x;r=x.replace;x=r(min(r(*' ~')),' ',1)

Try it online!

APL (Dyalog Unicode), 18 11 bytes
∪∘↓∘⍉⍋∘⍋⍴⌸⊢

Try it online!
uses ⎕io←1; returns an array of strings (vector of character vectors)

Is the ∪ necessary?

@Cowsquack yes, otherwise the first few rows of the output could be identical

@Cowsquack thanks, I didn't notice that

fortunately, fixing this led to a shorter solution :)

Nice one, really clever usage of ⍋∘⍋ :)

05AB1E, 9 bytes
ðм{v=yð.;

Try it online!
Explanation
ð      # Push space
м      # Implicit input. Remove spaces
{      # Sort. Gives string of sorted, non-space chars
v      # For each char in that string
  =    #   Print latest string, without popping. The first time it prints the input
  y    #   Push current char
  ð    #   Push space
  .;   #   Replace first occurrence of current char by space
       # Implicitly end for-each loop

{ðKv=yð.; was mine, nice one.

@MagicOctopusUrn Heh, pretty similar

@MagicOctopusUrn Actually, it would still be the same 9 bytes in the latest 05AB1E version.. : replaces all characters instead of .; which replaces the first (i.e. see what your 7-byter does with the ! in the test case). Also, the challenge explicitly states excluding spaces, so your 7-byter wouldn't work for input with multiple spaces. PS: Nice answer, Luis! +1 from me. :)

@KevinCruijssen leave it to me to forget why I had to use .; in the first place. I literally remember struggling with that on May 1st earlier this year now that you mention it.

Thanks both for your comments! I am not familiar with 05AB1E's recent features...

@LuisMendo Well, none of the commands you've used in this answer have changed in the Elixir rewrite of 05AB1E. :)

Pyth, 17 14 13 bytes
V-SQdQ=XQxQNd

Try it here
V-SQdQ=XQxQNd
V-SQd              For each non-space character in the sorted input (Q)...
     Q             ... print the current value of Q...
      = Q          ... and set Q to itself...
         xQN       ... with the first instance of the character...
       X    d      ... replaced by a space.

Ruby, 60 58 55 47 bytes
->a{[-a]+a.scan(/\S/).sort.map{|x|a[x]=' ';-a}}

Try it online!

You can swap in a-b=[' '] and a-b for a quick -2 bytes

Yeah, thanks for that, but now I've changed the approach a bit, so it is no longer used.

I like the new approach!

sed -rn, 142 143 bytes
:a
p
s/$/	ABCDEFGHIJKLMNOPQRSTUVWXYZ/
s	\w+$	!"#$%\&'()*+,-./0123456789:;<=>?@&[\\]^_`\L&{|}~
:b
/(.).*	\1/!s/	./	/
tb
s/(.)(.*)	\1.*/ \2/
ta

Try it online!
(note: there are tabs in the program)
Since sed has no concept of lexicographical order, I had to hardcode the set of printable ASCII characters in and it takes up more than half the bytecount.
Using sed 4.2.2 will reduce bytecount by 2, since that allows for unnamed labels, Try it online!

-r enables extended regular expressions (golfier)
-n disables implicit printing of the pattern space at the end of the program
The pattern space starts with the input
:a label a, this is the main program loop
p print the pattern space (fancy name for the buffer)
now we append the set of printable ASCII characters (excluding the space)
s/$/   ABCDEFGHIJKLMNOPQRSTUVWXYZ/ append a tab, acting as the 1-byte delimiter, followed by the uppercase alphabet
s<tab> substitute (sed can take any character as the delimiter, in this case the tab is used to save a byte from escaping the /)

\w+$ the uppercase alphabet we just appended
<tab> with
!"#$%\&'()*+,-./0123456789:;<=>?@&[\\]^_\`\L&{|}~<tab> the rest of the characters, note that \L& is the lowercase version of the uppercase alphabet

:b label b, remove characters from the beginning set that are not present in input
/(.).* \1/! if the first character from the ASCII set is not in the input

s/   ./  / remove it

tb repeat b until the substitution fails
s/(.)(.*)  \1.*/ \2/ replace the first character in the ASCII set present in the input with a space, and remove the ASCII set
ta recurse

Non-greedy matching would have been really helpful here, but I was able to come up with something that fooled sed enough to save at least 4 bytes: Try it online!

(Cows quack pointed out that I was only partly able to fool sed, as I remove identical characters in the wrong order.)

R, 140 100 bytes
-40 bytes Thanks to Giuseppe !

function(x)for(i in any((z=utf8ToInt(x))<33):max(y<-rank(z,,"f"))){z[y==i]=32
cat(intToUtf8(z),"
")}

Try it online!
A solution using outer and Giuseppe's magic to work properly is longer at 104 bytes. Inspired by this answer.
function(x,z=utf8ToInt(x)-32)apply(t(outer(rank(z,,"f"),(2-(min(z)>0)):nchar(x),">=")*z+32),1,intToUtf8)

Try it online!

109 bytes taking input as a vector of chars

100 bytes taking input as a string!

Still, a very nice answer; mine had ballooned to over 200 bytes since I didn't remember about rank!

@Giuseppe Tell me about it - I first tried "order" for a result that was melting but not in the correct order!

@Giuseppe and my attempt at using outer inspired by your post only managed to remove all spaces. TIO I'd love to see a working outer approach posted as a separate answer. Still working on it but it might not be that elegant.

oh, outer! You're almost there; I found a 91 byte solution with outer but I won't spoil it if you're still working on it.

@Giuseppe Please post it I've given up :)

Let us continue this discussion in chat.

Python 3, 71 bytes
f=lambda a:[*a.strip()]and[a]+f(a.replace(min(a.replace(*" ~"))," ",1))

Try it online!
-4 bytes thanks to ovs

Save 2 bytes using *bool({*a}-{" "}) instead of if{*a}-{" "}else[a]

@RootTwo wouldn't this result in a RecursionError?

@RootTwo if/else shortcuts but *bool doesn't, so yes, recursionerror like ovs said

Of course you are correct.  Because of a bug, my function recursed by calling your function so it appeared to work.

K (ngn/k), 26 24 bytes
{?(,x),x{x[y]:" ";x}\<x}

Try it online!

Beautiful! My K attempt came in at 41:
{.[x;(-1+#x)&x?_ci&/_ic x _dv" ";:;" "]}\
I'm wasting bytes converting to ints and back and making sure it doesn't go out of bounds.

@uryga Thanks. If I had implemented projections properly, {@[x;y;:;" "]} could have been @[;;:;" "]. Which version of k do you use? I'm not familiar with these: _ci _ic _dv.

I think it's 2.8-ish? I'm using the Kona interpreter which provides operators as builtins: char-of-int, int-of-char, delete-value.

Python 2, 70 69 66 64 bytes
def f(s):print s;S=set(s)-{' '};S and f(s.replace(min(S),' ',1))

Try it online!
Thx for 2 bytes from ovs via using S and f() instead of if S:f()

You're missing the ...If there is a tie, replace the leftmost character... rule, you can fix that with replace(min(...),' ',1)

@Rod: Ah! Got it...

Perl 5 -n, 37 34 bytes
Dropped three bytes with help from @TonHospel
say&&s/\Q$a/ / while($a)=sort/\S/g

Try it online!

Ah, very nice, much nicer approach! I think you need the \Q though for the last test case.... I missed that the first times too!

You're right.  Added it.

Shorter: say&&s/\Q$a/ / while($a)=sort/\S/g. Also properly handles 0

JavaScript, 67 66 65 bytes
Because I haven't golfed drunk in a while!
s=>[...t=s].sort().map(x=>x>` `?t+=`
${s=s.replace(x,` `)}`:0)&&t

Try it online
Thanks to DanielIndie for pointing out 4 redundant bytes that beer included!

why do you specify y in the map? :P it can be made 67

@DanielIndie, because Beer! :D Thanks for pointing it out.

yes, i thought that would be the case :P

Jelly, 8 bytes
ẋ"ỤỤ$z⁶Q

Try it online!
Idea
The basic idea is to build the columns of the desired output directly, instead of manipulating the string and returning all intermediate results.
We start by numerating the characters of the input string in the order they will be removed. For the moment, we'll pretend spaces will be removed as well.
tee ay oh
845139276

Now, we build the columns by repeating each character by its index in this enumeration.
tee ay oh
tee ay oh
tee ay oh
tee  y oh
t e  y oh
t    y oh
t    y o
t    y
     y

All that's left is to remove duplicates, to account for the spaces.
Code
ẋ"ỤỤ$z⁶Q  Main link. Argument: s (string)

    $     Combine the two links to the left into a chain.
  Ụ       Grade up; sort the indices of s by their corresponding values.
          Let's call the result J.
          Grade up again, sorting the indices of J by the corr. values in J.
          This enumerates the positions of s as described before.
ẋ"        Repeat each character of s that many times.
     z⁶   Zip the resulting 2D array, filling missing characters with spaces.
       Q  Unique; deduplicate the array of rows.

JavaScript (Node.js), 80 65 bytes
x=>[...x].sort().map(c=>x=x.replace(c,' ',c>' '&&console.log(x)))

Try it online!
Didn't know replace take string as string, not regexp

Perl 5 with -nlF/\s|/, 39 bytes
@F=sort@F;say,s~\Q$F[$F++]~ ~ while/\S/

This might be pushing the boundaries of Perl's flags not being counted, if so I'll revert to the previous answer.
Try it online!

Got it down to 35 bytes with only a -n flag: https://codegolf.stackexchange.com/questions/162161/make-a-word-icicle/162202#162202

gcc 32-bit, 66 65 bytes
char*p,i;f(a){for(i=32;i++;)for(p=a;*p;)*p==i?puts(a),*p=32:++p;}
main(){char s[]="3.1415926";f(s);}

Thanks for Jonathan Frech for -1 byte

*p==i?...:0; could probably be *p-i?0:...;.

@JonathanFrech No, it's 1 byte longer (though *p-1||(...) is same length)

Sorry, did not recognize the importance to keep the comma expression together. However, this might be 65 bytes. I also do not know how f(a) compiles, as a should be of type char*, but I assume that has something to do with your 32-bit gcc usage.

@JonathanFrech I think char*p,i;f(long long a){for(i=31;++i;)for(p=a;*p;)*p==i?puts(a),*p=32:++p;} on tio(64bit) may explain how f(a) work

I am sorry, though I asked the OP about the challenge specifications and they said the input string may start with a space. Therefore my proposed solution is invalid (as such an input results in an infinite loop) and you should most likely revert back to your original solution.

@JonathanFrech Your init value is wrong. Fixing it makes [start with a space] fine

You are right; I thought that for(i=32;i++;) would be equivalent to for(i=31;++i;), though did not realize that you use char overflow to end the for loop and that you start your second for loop with i==33. Glad to know that my golf works!

C# (Visual C# Interactive Compiler), 129 bytes
var s=ReadLine();while(s.Any(c=>c!=32)){WriteLine(s);var i=s.IndexOf(s.Min(c=>c==32?(char)999:c));s=s.Remove(i,1).Insert(i," ");}

Try it online!

c!=32 can be c>32; c==32 can be c<33; and (char)999 can be '¡' (or any other character above the printable ASCII unicode range).

Oh, and you can save two more bytes changing the while to for and placing the var s=ReadLine() and s=s.Remove(i,1).Insert(i," ") inside it (so the two semi-colons are no longer needed).

V, 27 bytes
>>ò2Ùúú^lDhrfDj|@"r kdòdj<H

Try it online!
Hexdump:
00000000: 3e3e f232 d9fa fa5e 6c44 6872 6644 6a7c  >>.2...^lDhrfDj|
00000010: 4022 7220 6b64 f264 6a3c 48              @"r kd.dj<H

Haskell, 67 bytes
12 bytes saved thanks to Laikoni
f s|(a,_:b)<-span(/=minimum(id=<<words s))s=putStrLn s>>f(a++' ':b)

Try it online!
This one terminates in an error
Haskell, 83 79 bytes
g(a,_:b)=a++' ':b
mapM_ putStrLn.(iterate$g.(span=<<(/=).minimum.concat.words))

Try it online!
This one terminates in an error
Haskell, 86 bytes
u=concat.words
g(a,_:b)=a++' ':b
(take.length.u)<*>(iterate$g.(span=<<(/=).minimum.u))

Try it online!
Haskell, 100 91 88 bytes
u=concat.words
f x|(a,_:b)<-span(/=minimum(u x))x=a++' ':b
(take.length.u)<*>(iterate f)

Try it online!

67 bytes: f s|(a,_:b)<-span(/=minimum(id=<<words s))s=putStrLn s>>f(a++' ':b) Try it online!

@Laikoni Thanks! I was just on the verge of something like that and I fell asleep.  However I don't think I would have come up with id=<< that's pretty clever

K4, 28 20 18 bytes
Solution:
?x{x[y]:" ";x}\<x:

Example:
q)k)?x{x[y]:" ";x}\<x:"PPCG is da BEST"
"PPCG is da BEST"
"PPCG is da  EST"
"PP G is da  EST"
"PP G is da   ST"
"PP   is da   ST"
" P   is da   ST"
"     is da   ST"
"     is da    T"
"     is da     "
"     is d      "
"     is        "
"      s        "
"               "

Explanation:
It's the same thing as ngn is doing. Find indices that would result in an ascending list, overwrite them one-by-one with " ", then take the distinct to remove any duplicate lines:
?x{x[y]:" ";x}\<x: / the solution
                x: / save input as x
               <   / return indices that would result in ascending sort
 x{        ; }\    / two-line lambda with scan
        " "        / whitespace
       :           / assignment
   x[y]            / x at index y
            x      / return x
?                  / distinct

Common Lisp, 240 228 224 bytes
(setf s(read))(defun f(x)(setf y(char-code(elt s x)))(if(= y 32)1e9 y))(loop for _ across s do(print s)do(setf s(replace s" ":start1(position(code-char(reduce #'min (loop for i from 0 below(length s)collect i):key #'f))s))))

Try it online!
This is my first time posting.
I'm in the process of learning lisp so I'm sure someone can think of something shorter than this.

Welcome to the site!  Good to see some common lisp!

MATLAB, 74 bytes
This uses the 2-output form of the max() function to retrieve the smallest character and its index, having transformed the string to zero values in the spaces and 256-the character value for the printable characters.
s=input('s');x=1;while(x);disp(s);[x,y]=max((256-s).*(s~=' '));s(y)=' ';end

Welcome to PPCG!  Nice work!

APL (Dyalog Unicode), 39 bytesSBCS
{⎕←⍵⋄×≢⍵∩g←' '~⍨⎕UCS⍳256:∇' '@(⊃g⍋⍵)⊢⍵}

Try it online!
Dfn.
How?
{⎕←⍵⋄×≢⍵∩g←' '~⍨⎕UCS⍳256:∇' '@(⊃g⍋⍵)⊢⍵} ⍝ Main function, argument ⍵
 ⎕←⍵⋄                                    ⍝ Print ⍵
         g←' '~⍨⎕UCS⍳256                 ⍝ Assign to g every Unicode character except space
     ×≢⍵∩                :               ⍝ If ⍵∩g is not empty
                          ∇              ⍝ Recursively call the function with argument:
                           ' '@       ⍵  ⍝ Space at
                               (⊃g⍋⍵)    ⍝ The first (⊃) element in ⍵ graded up (⍋) with g
                                         ⍝ The dyadic grade up function will index ⍵ according
                                         ⍝ to its left argument, in this case g.

PowerShell, 103 99 bytes
param($a)2..$a.length|%{($x=$a);[regex]$p=""+([char[]]$a-ne' '|sort)[0];$a=($p.replace($x," ", 1))}

Try it online!
Takes input as a string into $a. We then loop from 2 to $a.length (i.e., the appropriate number of vertical times necessary to remove all but one character). Each iteration, we output the current string and conveniently saved into $x at the same time. We then construct a new [regex] object, $pattern consisting of the remaining characters in $a that are -notequal to space, sorted, then the 0th one thereof.
We then set $a equal to a new string of the regex object with the .Replace method to replace in the string $x, the $pattern, with a space " ", but only the 1st match. Yeah, this syntax is weird.
The strings are left on the pipeline and implicit Write-Output gives us a newline between them for free, plus one trailing newline.

Perl 6, 42 37 bytes
{$_,{S/$(.comb(/\S/).min)/ /}...*eq*}

Try it online!

Java (JDK 10), 140 bytes
s->{for(int m=1,i;m>0;s=s.substring(0,i=s.indexOf(m=s.chars().filter(c->c>32).min().orElse(0)))+" "+s.substring(i+1))System.out.println(s);}

Try it online!
Technically there's a blank line, but it's not empty.

Japt, 32 18 bytes
Saved 14 bytes thanks to Shaggy!
rS ¬£=hSUbZn gYÃiN

Try it online!

Save a byte by returning an array of lines: https://ethproductions.github.io/japt/?v=1.4.5&code=rMulUz9TOlU9ZEZuIGdFIFM=&input=IkhlbGxvIFdvcmxkISIKLVI=

22 bytes. Will try a port of my JS solution soon, see how that works out.

Got it down to 18 bytes.

MATL, 17 16 bytes
tSXz"tOy@=f1)(]x

Try it online! Or verify all test cases.
Explanation
t       % Implicit input. Duplicate
S       % Sort
Xz      % Remove spaces
"       % For each char in that string
  t     %   Duplicate last result. This is the most recent string obtained
        %   from replacing chars by spaces in the input
  O     %   Push 0
  y     %   Duplicate from below
  @     %   Push current char
  =     %   Equals? (element-wise) Gives 1 for occurrences of current char
        %   in the most recent string, 0 otherwise
  f     %   Indices of nonzeros
  1)    %   Get the first entry
  (     %   Write 0 at that position. Char 0 will be displayed as space
]       % End
x       % Delete last result, which consists only of space / char zero

Stax, 9 bytes
ü¡%/"=πbΓ

Run and debug it
This is the same algorithm as Luis' 05AB1E solution

Excel VBA, 167 bytes
An anonymous VBE immediate window function that takes input from range [A1] and outputs to the VBE immediate window.
s="Code(Mid(A$1,Row(),1))":[B1].Resize([Len(A1)])="=If("&s &"=32,1E3,"&s &")":For i=1To[Len(A1)-CountIf(B:B,1E3)]:?[A1]:[A1]=[Substitute(A1,Char(Min(B:B))," ",1)]:Next

Ungolfed and Commented
''  run as `call icicle("Test")` or `icicle"I am the WALRUS`
Sub icicle(Optional str As String)
    If Not IsMissing(str) Then [A1] = str   ''  pipe input
    [B:B].Clear                             ''  reset between runs
    [B1].Resize([Len(A1)]) = "=If(Code(Mid(A$1,Row(),1))=32,1E3,Code(Mid(A$1,Row(),1)))"  ''  get char number for every char in input
    For i = 1 To [Len(A1)-CountIf(B:B,1E3)] ''  iterate across from 1 to length of input - number of spaces
        Debug.Print [A1]                    ''  output a single line
        [A1]=[Substitute(A1,Char(Min(B:B))," ",1)]  ''  replace minimum char with space
    Next
End Sub

Z80 machine code on an Amstrad CPC, 51 bytes, 54 with safety
The following code progressively destroys the input string as each line is output:
(1A B7 C8)EB 4E 23 5E 23 56 41 1A 13 CD 5A BB 10
 F9 26 FF 41 1B 1A FE 21 38 06 BC 30 03 68 67 24
 10 F2 24 C8 2D 26 00 19 36 20 3E 0D CD 5A BB 3E
 0A CD 5A BB 18 D3

As assembler:
WinAPE Z80 Assembler V1.0.13
000001  0000  (8000)        ORG &8000
000002  8000  1A            LD A, (DE)
000003  8001  B7            OR A
000004  8002  C8            RET Z
000006  8003  EB            EX DE, HL
000008  8004  4E            LD C, (HL)
000010  8005  23            INC HL
000011  8006  5E            LD E, (HL)
000012  8007  23            INC HL
000013  8008  56            LD D, (HL)
000015  8009                LabelPrintString
000016  8009  41            LD B, C
000017  800A                LabelPrintChar
000018  800A  1A            LD A, (DE)
000019  800B  13            INC DE
000020  800C  CD 5A BB      CALL &BB5A
000021  800F  10 F9         DJNZ LabelPrintChar
000023  8011  26 FF         LD H, &FF
000024  8013  41            LD B, C
000026  8014                LableIcicle
000027  8014  1B            DEC DE
000028  8015  1A            LD A, (DE)
000029  8016  FE 21         CP &21
000030  8018  38 06         JR C, LabelNextChar
000031  801A  BC            CP H
000032  801B  30 03         JR NC, LabelNextChar
000033  801D  68            LD L, B
000034  801E  67            LD H, A
000035  801F  24            INC H
000036  8020                LabelNextChar
000037  8020  10 F2         DJNZ LableIcicle
000038  8022  24            INC H
000039  8023  C8            RET Z
000040  8024  2D            DEC L
000041  8025  26 00         LD H, &00
000042  8027  19            ADD HL, DE
000043  8028  36 20         LD (HL), &20
000044  802A  3E 0D         LD A, &0D
000045  802C  CD 5A BB      CALL &BB5A
000046  802F  3E 0A         LD A, &0A
000047  8031  CD 5A BB      CALL &BB5A
000048  8034  18 D3         JR LabelPrintString

Z80 machine code on an Amstrad CPC, 63 bytes, 66 with safety
I reworked the code to be non-destructive, but unfortunately the best I could do increased the size by 12 bytes:
(1A B7 C8)EB 46 23 5E 23 56 26 20 24 C8 2E 00 D5
 C5 0E 00 1A BC 38 0A 20 0A 0C 79 BD 38 03 1A 18
 02 3E 20 2C 2D 28 03 CD 5A BB 13 10 E6 28 0A 3E
 0D CD 5A BB 3E 0A CD 5A BB 7D B9 C1 D1 30 CC 2C
 18 CD

As assembler:
000001  0000  (8000)        ORG &8000
000002  8000                LabelSafeEntry
000003  8000                ; On entry, DE contains pointer to last parameter
000004  8000  1A            LD A, (DE)
000005  8001  B7            OR A
000006  8002  C8            RET Z ; Return if the input string had zero length
000008  8003                ; Start here if safety not required
000009  8003                LabelUnsafeEntry
000010  8003  EB            EX DE, HL ; HL is easier to use than DE. Swap their values
000012  8004                ; First byte is length of string
000013  8004  46            LD B, (HL)
000015  8005                ; Next word is address of string. Load it into DE
000016  8005  23            INC HL
000017  8006  5E            LD E, (HL)
000018  8007  23            INC HL
000019  8008  56            LD D, (HL)
000021  8009  26 20         LD H, &20 ; current_char
000023  800B                LabelNextChar
000024  800B  24            INC H
000025  800C  C8            RET Z
000026  800D  2E 00         LD L, &00 ; number
000028  800F                LabelParseString
000029  800F  D5            PUSH DE
000030  8010  C5            PUSH BC
000032  8011  0E 00         LD C, &00 ; number2
000033  8013                LabelPrintString
000034  8013  1A            LD A, (DE)
000035  8014  BC            CP H
000036  8015  38 0A         JR C, LabelPrintSpace
000037  8017  20 0A         JR NZ, LabelPrintChar
000038  8019  0C            INC C
000039  801A  79            LD A, C
000040  801B  BD            CP L
000041  801C  38 03         JR C, LabelPrintSpace
000042  801E  1A            LD A, (DE)
000043  801F  18 02         JR LabelPrintChar
000044  8021                LabelPrintSpace
000045  8021  3E 20         LD A, &20
000046  8023                LabelPrintChar
000047  8023  2C            INC L
000048  8024  2D            DEC L
000049  8025  28 03         JR Z, LabelSkipPrint
000050  8027  CD 5A BB      CALL &BB5A
000051  802A                LabelSkipPrint
000052  802A  13            INC DE
000053  802B  10 E6         DJNZ LabelPrintString
000055  802D  28 0A         JR Z, LabelNoNewLine
000056  802F  3E 0D         LD A, &0D
000057  8031  CD 5A BB      CALL &BB5A
000058  8034  3E 0A         LD A, &0A
000059  8036  CD 5A BB      CALL &BB5A
000060  8039                LabelNoNewLine
000061  8039  7D            LD A, L
000062  803A  B9            CP C
000063  803B  C1            POP BC
000064  803C  D1            POP DE
000065  803D  30 CC         JR NC, LabelNextChar
000066  803F  2C            INC L
000067  8040  18 CD         JR LabelParseString

The first 3 optional bytes check if the string is empty. Since the challenge specified a string of at least two characters, I'm not counting these bytes and starting execution with CALL &8003, a$ instead of CALL &8000, a$
The next 6 bytes get the input string into a usable state. A pointer to a reference to the last parameter (the string) is passed to the program in DE. The pointer can be used directly, but the reference needs to be dereferenced

Program 1

8009 - 8035 Print String

Load counter register B with string length C
Do Print Char (on exit B is &00 and DE is the string address + its length)
Load H with &FF - an invalid ASCII character
Load counter register B with string length C
Do Icicle (on exit B is &00, H is the next ASCII character after the one to be replaced (if found), L is the character position to change to a space, and DE is back to just the string address)
Increment H. If it was still &FF, it will wrap to &00
Return if zero (this is the only exit point)
Decrement L to make it zero-based
Load H with &00. This expands the 8-bit value in L to a 16-bit value in HL
Add DE to HL (this is the address of the character to change)
Load the memory at (HL) with a space
Print "\r" (5 bytes of code!)
Print "\n" (another 5 bytes of code!)
Repeat Print String

800A - 8010 Print Char (works the string left-to-right)

Load A with the current character pointed to by (DE)
Increment DE
Do a system call to print the character in A
Decrement B and repeat Print Char if not zero

8014 - 8021 Icicle (works the string right-to-left)

Decrement DE
Load A with the current character pointed to by (DE)
If A is less than &21, go to the end of the loop
If A is greater than or equal to H, go to the end of the loop
Store the current character position (B) in L
Store the current ASCII character in H
Increment H so that repeats of this character can be detected easily
Decrement B and repeat Icicle if not zero

The last line always contains only spaces.

Program 2
See annotations in the code. The last line always contains one printing character other than spaces.

The programs are called from BASIC by either passing a string variable or a string literal.

CALL &8003, a$
CALL &8003, "I'm Melting!!!"

Pyth, 13 bytes
uXGxG<r6S
G1d

Try it here!
A nice challenge I wanted to answer for a long time. I am aware that there's another Pyth 13-byter, but the methods used to solve the task are quite different, so I think it's worth posting (this one doesn't use imperative structures like V nor assignments such as =). The output contains obnoxiously many unnecessary trailing spaces and linefeeds.
Explanation
It's a full program that takes input from STDIN (quoted) and outputs to STDOUT.
uXGxG<r6S\nG1d – Note that I escaped the newline using \n, for readability.

u              – Until a result that has occurred before is found, do the following:
         \nG   – Print the current state of the string, G, which is initially the input.
        S      – Sort the current string.
      r6       – Strip all whitespace.
     <      1  – Take the first element, but avoid throwing errors if there are no
                 characters left to be trimmed.
   xG          – Find its index in G.
 XG          d – And replace the character at the index with a space.

Oracle SQL 11.2, 196 bytes
WITH v(s)AS(SELECT :1 FROM DUAL UNION ALL SELECT REGEXP_REPLACE(s,(SELECT MIN(TRIM(SUBSTR(s,LEVEL,1)))FROM DUAL CONNECT BY LEVEL<=LENGTH(s)),' ',1,1)FROM v WHERE LENGTH(TRIM(s))>0)SELECT * FROM v;

Un-golfed
WITH v(s)AS
(
  SELECT :1 FROM DUAL
  UNION ALL
  SELECT REGEXP_REPLACE(s,(SELECT MIN(TRIM(SUBSTR(s,LEVEL,1)))
                           FROM DUAL CONNECT BY LEVEL<=LENGTH(s)),' ',1,1)
  FROM v WHERE LENGTH(TRIM(s))>0
)
SELECT * FROM v;

J,  36  32 bytes
echo~.(\:\:~"1]\@\:~)&.|.>2{ARGV

previous 36 = echo~.@|.@(|.@/:/:~"1[:]\\:~)>2{ARGV  .. my silly redundant @'s wasted 2 chars NB. improvements courtesy of @FrownyFrog
explanation:

> 2{ ARGV unboxes the second argument of TIO's script runner
… &. |. reverse string do … and re-reverse the result
( \: \:~"1 ]\@\:~ ) permutes each row (i.e. columns)
\: permutation required to rank descending \:~ sort descending
echo ~. print the distinct (aka "nub") rows

or if the text has a space as its least char, 24 bytes fn
f=:/:~{~i.@#(]*<)"{/:@/:

TIO

The first 2 @s are unnecessary but you can use one in ]\@\:~

So you can get rid of the ~ in the middle, and save another one with &.|. for 31.

You forgot to commute

brainfuck, 125 bytes
,[.[>+>+<<-]>>>++++[<-------->-],]<,<[[<<<]>>>[[>[-[>]->[>>]<<<+[>,<+++[>+++++++
+<-]>[<<<]>>>[.>>>]+[-<+]]]>]>]<<<[<<[>>]<]<]

Formatted:
,
[
  .[>+>+<<-]
  >>>++++[<-------->-],
]
<,<
[
  [<<<]
  >>>
  [
    [
      >
      [
        -[>]
        ->[>>]
        <<<+
        [
          >,<+++[>++++++++<-]>[<<<]
          >>>[.>>>]
          +[-<+]
        ]
      ]
      >
    ]
    >
  ]
  <<<
  [
    <<[>>]
    <
  ]
  <
]

Expects a trailing newline in the input.
Try it online

Attache, 45 bytes
PeriodicSteps!{Place[_,_&Index!Min!_^^sp,sp]}

Try it online!
Explanation
PeriodicSteps takes a function f as an argument and returns a function which nests f on the argument until two results are the same. Then, all intermediate results are stored in a list and returned.
Then, {Place[_,_&Index!Min!_^^sp,sp]} performs a single "metling" iteration:
{Place[_,_&Index!Min!_^^sp,sp]}
{                             }   anonymous function
 Place[                    sp]    place a space
           Index!Min!_              where the index of of the minimal element
                      ^^sp            (except spaces)
       _,_&                       ...in the input

Powershell, 92 bytes
param($s)($s|% t*y)-ne' '|sort|%{$c=$_;$s
$s=-join($s|% t*y|%{if(!($c-$_)){$c=($_=' ')}$_})}

Less golfed test script:
$f = {

param($s)                   # an argument string
($s|% t*y)-ne' '|sort|%{    # convert toCharArray(), exclude ' ', sort and make for each char...
    $s                      # push current string to the pipe as a line of the result
    $c=$_                   # store current char
    $s=-join($s|% t*y|%{    # $s is a new copy
        if(!($c-$_)){       # in which a first occurence of the current char and spaces
            $c=($_=' ')     # replaced by space char
        }
        $_                  # push a char to new $s
    })
}

}

@(

    ,("TD.([)]* a) regex specials",   # ;P
      "TD.([)]* a) regex specials",
      "TD. [)]* a) regex specials",
      "TD. [ ]* a) regex specials",
      "TD. [ ]* a  regex specials",
      "TD. [ ]  a  regex specials",
      "TD  [ ]  a  regex specials",
      "T   [ ]  a  regex specials",
      "    [ ]  a  regex specials",
      "      ]  a  regex specials",
      "         a  regex specials",
      "            regex specials",
      "            regex speci ls",
      "            regex spe i ls",
      "            r gex spe i ls",
      "            r g x spe i ls",
      "            r g x sp  i ls",
      "            r   x sp  i ls",
      "            r   x sp    ls",
      "            r   x sp     s",
      "            r   x s      s",
      "                x s      s",
      "                x        s",
      "                x         ")

    ,("Word Icicle!",
      "Word Icicle!",
      "Word Icicle ",
      "Word  cicle ",
      " ord  cicle ",
      " ord   icle ",
      " ord   i le ",
      " or    i le ",
      " or    i l  ",
      " or      l  ",
      " or         ",
      "  r         ")

     ,("I'm Melting!!!",
       "I'm Melting!!!",
       "I'm Melting !!",
       "I'm Melting  !",
       "I'm Melting   ",
       "I m Melting   ",
       "  m Melting   ",
       "  m  elting   ",
       "  m   lting   ",
       "  m   ltin    ",
       "  m   lt n    ",
       "  m    t n    ",
       "       t n    ",
       "       t      ")

     ,("Hello World!",
       "Hello World!",
       "Hello World ",
       " ello World ",
       " ello  orld ",
       " ello  orl  ",
       "  llo  orl  ",
       "   lo  orl  ",
       "    o  orl  ",
       "    o  or   ",
       "       or   ",
       "        r   ")

    ,("AbCdEfGhIjKlMnOpQrStUvWxYz",
      "AbCdEfGhIjKlMnOpQrStUvWxYz",
      " bCdEfGhIjKlMnOpQrStUvWxYz",
      " b dEfGhIjKlMnOpQrStUvWxYz",
      " b d fGhIjKlMnOpQrStUvWxYz",
      " b d f hIjKlMnOpQrStUvWxYz",
      " b d f h jKlMnOpQrStUvWxYz",
      " b d f h j lMnOpQrStUvWxYz",
      " b d f h j l nOpQrStUvWxYz",
      " b d f h j l n pQrStUvWxYz",
      " b d f h j l n p rStUvWxYz",
      " b d f h j l n p r tUvWxYz",
      " b d f h j l n p r t vWxYz",
      " b d f h j l n p r t v xYz",
      " b d f h j l n p r t v x z",
      "   d f h j l n p r t v x z",
      "     f h j l n p r t v x z",
      "       h j l n p r t v x z",
      "         j l n p r t v x z",
      "           l n p r t v x z",
      "             n p r t v x z",
      "               p r t v x z",
      "                 r t v x z",
      "                   t v x z",
      "                     v x z",
      "                       x z",
      "                         z")

    ,("PPCG is da BEST",
      "PPCG is da BEST",
      "PPCG is da  EST",
      "PP G is da  EST",
      "PP G is da   ST",
      "PP   is da   ST",
      " P   is da   ST",
      "     is da   ST",
      "     is da    T",
      "     is da     ",
      "     is d      ",
      "     is        ",
      "      s        ")

    ,("({({})({}[()])}{})",
      "({({})({}[()])}{})",
      " {({})({}[()])}{})",
      " { {})({}[()])}{})",
      " { {}) {}[()])}{})",
      " { {}) {}[ )])}{})",
      " { {}  {}[ )])}{})",
      " { {}  {}[  ])}{})",
      " { {}  {}[  ] }{})",
      " { {}  {}[  ] }{} ",
      " { {}  {}   ] }{} ",
      " { {}  {}     }{} ",
      "   {}  {}     }{} ",
      "    }  {}     }{} ",
      "    }   }     }{} ",
      "    }   }     } } ",
      "        }     } } ",
      "              } } ",
      "                } ")

) | % {
    $s,$expected = $_
    $result = &$f $s
    "$result"-eq"$expected"
    $result            # comment this line to compact output
}

Output:
True
TD.([)]* a) regex specials
TD. [)]* a) regex specials
TD. [ ]* a) regex specials
TD. [ ]* a  regex specials
TD. [ ]  a  regex specials
TD  [ ]  a  regex specials
T   [ ]  a  regex specials
    [ ]  a  regex specials
      ]  a  regex specials
         a  regex specials
            regex specials
            regex speci ls
            regex spe i ls
            r gex spe i ls
            r g x spe i ls
            r g x sp  i ls
            r   x sp  i ls
            r   x sp    ls
            r   x sp     s
            r   x s      s
                x s      s
                x        s
                x
True
Word Icicle!
Word Icicle
Word  cicle
 ord  cicle
 ord   icle
 ord   i le
 or    i le
 or    i l
 or      l
 or
  r
True
I'm Melting!!!
I'm Melting !!
I'm Melting  !
I'm Melting
I m Melting
  m Melting
  m  elting
  m   lting
  m   ltin
  m   lt n
  m    t n
       t n
       t
True
Hello World!
Hello World
 ello World
 ello  orld
 ello  orl
  llo  orl
   lo  orl
    o  orl
    o  or
       or
        r
True
AbCdEfGhIjKlMnOpQrStUvWxYz
 bCdEfGhIjKlMnOpQrStUvWxYz
 b dEfGhIjKlMnOpQrStUvWxYz
 b d fGhIjKlMnOpQrStUvWxYz
 b d f hIjKlMnOpQrStUvWxYz
 b d f h jKlMnOpQrStUvWxYz
 b d f h j lMnOpQrStUvWxYz
 b d f h j l nOpQrStUvWxYz
 b d f h j l n pQrStUvWxYz
 b d f h j l n p rStUvWxYz
 b d f h j l n p r tUvWxYz
 b d f h j l n p r t vWxYz
 b d f h j l n p r t v xYz
 b d f h j l n p r t v x z
   d f h j l n p r t v x z
     f h j l n p r t v x z
       h j l n p r t v x z
         j l n p r t v x z
           l n p r t v x z
             n p r t v x z
               p r t v x z
                 r t v x z
                   t v x z
                     v x z
                       x z
                         z
True
PPCG is da BEST
PPCG is da  EST
PP G is da  EST
PP G is da   ST
PP   is da   ST
 P   is da   ST
     is da   ST
     is da    T
     is da
     is d
     is
      s
True
({({})({}[()])}{})
 {({})({}[()])}{})
 { {})({}[()])}{})
 { {}) {}[()])}{})
 { {}) {}[ )])}{})
 { {}  {}[ )])}{})
 { {}  {}[  ])}{})
 { {}  {}[  ] }{})
 { {}  {}[  ] }{}
 { {}  {}   ] }{}
 { {}  {}     }{}
   {}  {}     }{}
    }  {}     }{}
    }   }     }{}
    }   }     } }
        }     } }
              } }
                }

Japt -R, 14 bytes
·cU¸c¬Í£=hSUbX

Try it
·cU¸c¬Í£=hSUbX     :Implicit input of string U
·                  :Split on newlines (of which there are none)
 c                 :Concatenate
  U¸               :  Split U on spaces
    c              :  Flat map
     ¬             :    Split
      Í            :  Sort
       £           :  Map each X
        =          :    Reassign to U
         h         :      Replace character in U at index
           UbX     :      First index of X in U
          S        :      with Space

12 bytes
If only we didn't have to handle inputs containing RegEx characters.
¸c¬Íi £=rXSP

Try it

Uiua SBCS, 9 bytes
⍉⬚@ ∵▽⍏⍏.

Try it!
⍉⬚@ ∵▽⍏⍏.
        .  # duplicate
      ⍏⍏   # double rise ie the index of each character's sorted position
 ⬚@ ∵▽     # repeat each letter that many times, filling with space
⍉          # transpose

Vyxal j, 7 bytes
ȧgḟðȦ)↔

Try it Online! Outputs as a list of lines, j flag formats as string.
     )↔ # Repeat until no change, collecting intermediates
  ḟ     # Find the index of
 g      # Minimum
ȧ       # (ignoring spaces)
    Ȧ   # Replace the char at that index with
   ð    # A space

Retina, 40 bytes
/\S/{¶<`^
$'¶
O`\G.
 *(\S).*¶(.*?)\1
$2

Try it online!

Haskell, 107 bytes
f s|sum[1|' '<-s]+1==length s=[s]|g<-(/=minimum(filter(/=' ')s))=s:f(fst(span g s)++' ':tail(snd$span g s))

Try it online!
Just out-golf me. Shouldn't be too hard, my brain isn't fully functional right now. :P

Here ya go :),  However once Laikoni or H.P.Wiz sees this I'm done.

sum[1|' '<-s]+1==length s can be 1:[1|' '<-s]==(1<$s). filter(>' ')s should also work.

Julia 0.6, 82 bytes
g(s,r=filter(c->c!=' ',s),q=println(s))=isempty(r)||g(replace(s,minimum(r),' ',1))

Try it online!

Charcoal, 22 bytes
ＷΦθ‹ κ«θ⸿≔⭆θ⎇⁼λ⌕θ⌊ι κθ

Try it online! Link is to verbose verison of code. Explanation:
ＷΦθ‹ κ«

Filter out spaces from the value. Repeat while there are still characters remaining, which are saved in the variable i, as we'll need the smallest later, and we don't want to include spaces in that determination. (There used to be a bug in Charcoal whereby the while loop didn't reserve the variable i until after the first loop, which would have made the Filter impossible, as the first loop it would try to use i instead of k.)
θ⸿

Print the value on its own line.
≔⭆θ⎇⁼λ⌕θ⌊ι κθ

Map over the characters of the value, replacing the one at the same position as the lexically smallest with a space, and replace the value with the result.

Python 3, 93 bytes
a=input()
while len(a)-a.count(' '):print(a);a=a.replace(sorted(a.replace(' ',""))[0],' ',1)

EDIT: Python 3, +1 -> remembered that python 2's input is int

Coconut, 46 bytes
x->scan((o,n)->o.replace(n,' ',1),sorted(x),x)

Try it online!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
cardinal numbers into ordinal numbers
Description :
Given an input (a string , array , integer) , Your job is to append one of the following to it.
st , nd , rd , th .
Examples :
1 ---> 1st
2 ---> 2nd
3 ---> 3rd
4 ---> 4th
11 ---> 11th
12 ---> 12th
13 ---> 13th
14 ---> 14th
and so on and so forth

This is code golf so shortest code will win in each language.
Good luck and have fun

a string , integer or an array (choose what you like) , all will be integers or can be converted to integers.

You probably should include all special cases such as 11th, 12th and 13th (vs 21st, 22nd, 23rd).

ok. Will do. Thanks

You are essentially asking for a program to convert cardinal numbers into ordinal numbers.  You may want to acknowledge this in the title.

@Arnauld : There updated to add that. Is it ok now

You should explain exactly how the problem works. On the first read-through I was incredibly confused as to what you were asking. It's not clear what the examples are, and I assumed that you were just trying to teach us how ordinal numbers work because it was relevant to the actual challenge for some reason. You should mark the test cases as being test cases to prevent confusion, and also explain the exact process.

@LyricLy : Ok sorry for that. will do

There done. Updated both title and description

You may want to turn this into a decision-problem instead: given a string, return a truthy value if it's a valid ordinal number or a falsy value otherwise (e.g. "21st" is true, "12nd" is false). I think that would be quite different from the other challenge. But please wait for feedback from other users before doing so. (Also, it might be a dupe as well... I didn't check.)

@Arnauld : Ok will do that. And I can wait for their input. Thanks for that.

Please consider using the sandbox for that.

@Arnauld : Thanks. I guess I will put it there.

Hi : thank you @Arnauld , I posted this question in the sandbox