SAN FRANCISCO — Not too long ago, the market for associates was so dismal, recruiters at Swan Legal Search worked four-day weeks to cut expenses.

That’s all changed in recent months, thanks in large part to the recent rebound of M&A and IPO activity in Silicon Valley, founder Delia Swan said. Now there’s so much demand in Silicon Valley for midlevel associates, particularly in corporate departments, she’s hired two new recruiters and is looking to hire more.