I read this novel somewhere around 2010 (2006-2016, can't be much more precise than that). It was in English, probably an American writer. It might have been the first in a series, probably for young adults.
The main character is a young woman who's a somewhat skilled/notorious assassin. Somehow she ends up in the hands of the prince and a military officer (captain of guards?), both of whom are sympathetic characters although the prince's father the king isn't. I don't remember if the story starts with her capture, or if she was in prison and they get her out, or what. Anyway, they want her to take part in a contest, which most of the book is about.
The contest involves 24 people competing in various physical feats: speed, strength, endurance, etc. People are eliminated one by one as they lose (or die), and the eventual winner is promised some kind of position (royal bodyguard? leading an expedition? something prestigious). Our heroine takes part under a false name, since nobody is supposed to know that she's this famous assassin. She's already capable enough that she could easily win every competition, but the prince and officer tell her to play herself down, end up in the middle rankings each time: not at the bottom to be eliminated, nor at the top to draw attention to herself. The other competitors don't take her seriously (maybe because she's a woman?) There's a massive guy who wins most of the competitions and is thought to be a favourite to win overall, but he might be using some underhand tactics. Sort of Hunger Games vibe, with 24 competitors and the underdog female heroine vs the giant a'hole guy.
Some kind of love triangle begins to develop between the assassin, the prince, and the officer. (Sigh, YA fiction.) I remember it being unclear which of the two men she really had feelings for. Also some complications arose during the contest - some competitors being mysteriously murdered? Maybe the giant guy ended up being responsible.
At the end of the contest, when there's only two competitors left, of course it's the heroine and the giant guy. They fight a duel in front of everyone, and he uses some kind of dirty trick against her (poisoned sword? drugged drink?) so that he's about to win even though she's better. I don't remember how it ended: maybe the prince or officer stepped in to kill the giant guy? Anyway, he died and she won, but the story more or less ended there. That's why I feel it might have been the first in a series, although I didn't read any more. I think there was some unresolved plot arc involving the king as well: he was portrayed as really evil, and maybe even his son was against him. Maybe the whole idea of this assassin enrolling incognito in the contest was a hope of bringing down the king from her new position.
That should be enough detail for someone to find the story ...