Find kth smallest number in range [ 1 , n ] when all the odd numbers are deleted | Java implementation of the approach ; Function to return the kth smallest element from the range [ 1 , n ] after removing all the odd elements ; Driver code
class GFG { static int kthSmallest ( int n , int k ) { return ( 2 * k ) ; } public static void main ( String args [ ] ) { int n = 8 , k = 4 ; System . out . print ( kthSmallest ( n , k ) ) ; } }