Find kth smallest number in range [ 1 , n ] when all the odd numbers are deleted | Function to return the kth smallest element from the range [ 1 , n ] after removing all the odd elements ; Driver code
< ? php function kthSmallest ( $ n , $ k ) { return ( 2 * $ k ) ; } $ n = 8 ; $ k = 4 ; echo ( kthSmallest ( $ n , $ k ) ) ; ? >