Lifetime Optimization of a Single and Multiple Sinks Wireless Sensor Network Ensuring Maximum Coverage and Connectivity