Classical SR flip-flops require two NAND gates for active-low inputs or two NOR gates for active-high inputs. The circuit shown uses only two inverters connected in a latch configuration via resistors R1 and R2 (see the figure). This arrangement is useful when a design requires an SR flip-flop, but there are only a few unused inverters, and no NAND or NOR gates are available.
Furthermore, this SR flip-flop topology is more versatile than traditional SR flip-flops. That's because it can behave either like a NAND-based or NOR-based flip-flop, depending on the polarities of diodes D1 and D2.
When diodes D1 and D2 are connected as shown in the figure, the inputs are activated by a positive pulse and the circuit behaves like a SR flip-flop built with NOR gates. In this case, A is the SET input and B is the RESET input.
If the polarities of D1 and D2 are reversed, the circuit acts like a classical NAND-based SR flip-flop with active low inputs. In this case, B is the SET input and A is the RESET input. Of course, you can add more diodes to increase the number of independent S and R inputs. The values of R1 and R2 aren't critical but they should be equal.