Hello friends, in last a couple of years, I have seen an increase in Coding Problems where interviewer expect you to solve using functional programming concepts and particularly map() and flatMap(). They do this because they want to know whether you know about these methods or not and whether you can use them in real world scenarios like solving coding problems. I have been collecting such coding problems and today, I am ready with 10 such map and flatMap related coding questions which I am going to share with you. The beauty of these coding interview questions is that you can easily solve them using Stream API and map() and flatMAp() method but if you try to solve them without using Stream API, it could be little tricky.
This post first appeared on Javarevisited: Blog About Java Programmin, please read the originial post: here