assume awesome parent want child cookie but child cookieeach child greed factor gi minimum size cookie child content cookie j size sj if sj gi assign cookie j child child content your goal maximize number content child output maximum number Example 1input g 123 s 11output 1explanation you 3 child 2 cookie the greed factor 3 child 1 2 3 and 2 cookie size 1 child greed factor 1 contentyou need output 1example 2input g 12 s 123output 2explanation you 2 child 3 cookie the greed factor 2 child 1 2 you 3 cookie size big gratify child you need output 2 Constraints1 glength 3 1040 slength 3 1041 gi sj 231 1