good moment to take care for IWV, a boolean or a 1-0 equivalent is the way to go for databases or whatever is your upstream source of data
I do not know how much you are familiar with algorithms and data structures, every use case depends, arrays, dataframes, list, push/pop, graphs, SQL,no SQL...