Actual, specific approaches to tackling tough problems are taught by the famous Hungarian mathematician George Polya in his classic book How to Solve It [3].
Discrete Mathematics is a field that covers a number of areas, but especially in counting problems (from combinatorics) and graph theory there are a number of results that are not hard to grasp but lead to beautiful solutions for real problems. There are many powerful theorems and principles in discrete math that will unlock seemingly impossible problems. Unfortunately, the books for this subject are mostly written for math majors that are interested not only the application of these results but how to prove them and consequently the books may not appeal to everyone. Perhaps something like Schaum's Outline of Discrete Mathematics would suitably cover the way to apply some of the important theorems without bogging down in the proofs.
Finally, I think there is value in doing small interesting programming projects. Two older books, available used, with interesting projects are Etudes for Programmers by Wetherell [5] and Software Tools in Pascal by Kernighan and Plauger [6]. Etudes has my favorite exercise for trying out new programming languages, building an interpreter for the simple TRAC programming language; Software Tools has a number of programs in Pascal that do interesting things, try implementing the programs in your programming language--they cover a range of difficulties and the book has a nice discussion for each that explains why the programs are structured the way they are.
A more advanced book, Structure and Interpretation of Programming Languages, available as a downloadable pdf [7] is a classic book for those wanting to become better programmers.
[1] https://www.amazon.com/Martin-Gardner/e/B000AP8X8G/ref=sr_tc...
[2] https://www.amazon.com/Raymond-M.-Smullyan/e/B000AQ1NF0/ref=...
[3] https://www.amazon.com/How-Solve-Mathematical-Princeton-Scie...
[4] https://www.amazon.com/Schaums-Outline-Discrete-Mathematics-...
[5] https://www.amazon.com/Etudes-Programmers-Charles-Wetherell/...
[6] https://www.amazon.com/Software-Tools-Pascal-Brian-Kernighan...
https://www.amazon.com/Etudes-Programmers-Charles-Wetherell/...
The idea of using bitmaps for retrieval on multiple indexes isn't new. Not surprisingly Knuth has a good discussion of the technique [Knuth], it was explained very well with a nice illustration of using notched recipe cards that is worth taking a peek at.
-- straying off topic below this line --
One surprising note, Calvin N. Mooers invented zatocoding in 1947. This technique used the notched cards for information retrieval and cited by Knuth under the subsection superimposed coding. Calvin N. Mooers went on to invent the "Reactive Typewriter" in the 1960s. This was an visionary implementation of how users might interact with computers using a terminal device (like a teletype). Mooers' Reactive Typewriter was programmed using a language he invented named TRAC.
TRAC is a macro based language. It, like the roughly contemporaneous GPM of Christopher Strachey (1965), is a Turing complete language based on macros that can define other macros, etc. I learned about TRAC in the mid 1970s from Ted Nelson's book Computer Lib/Dream Machines [Nelson]. It was one of three languages featured in that book. A fun little book, Etudes for Programmers, which I bought in 1978 inspired me to implement a version of TRAC. It's a nice exercise.
Many years later (I believe it was 1991), during an Open Software Foundation meeting in Cambridge, Massachusetts, I got to meet Mooers in person, he was sitting in the front row during a presentation, and I got to speak with him briefly afterwards.
By the way, Christopher Strachey wrote the first paper on the concept of time-sharing in 1959 and in the 1970's with Dana Scott is credited with coming up with the important development in the theory of programming languages known as Denotational Semantics.
[Knuth] Donald Knuth. (1973).The Art of Computer Programming, Vol 3/Sorting and Searching. Section 6.5, Retrieval on Secondary Keys. Addison-Wesley.
[Nelson] Theodor H Nelson. (1974). Computer lib : you can and must understand computers now. ISBN 0893470023. OCLC 11182412. https://en.wikipedia.org/wiki/Computer_Lib/Dream_Machines
[Strachey] https://en.wikipedia.org/wiki/Christopher_Strachey#cite_note...
[Wetherell] Charles Wetherell, Etudes for Programmers, Prentice Hall, 1977, https://www.amazon.com/Etudes-Programmers-Charles-Wetherell/...