gpt4 book ai didi

algorithm - 不使用交换函数反转不可编辑的字符串

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:21:07 26 4
gpt4 key购买 nike

最近在做一些面试题,碰到这个题::

Reverse a string word by word in place without using the swap function. The string in not-editable.

来源::http://www.geeksforgeeks.org/adobe-interview-experience/ (第六轮,(b)部分)

这可能吗?反转不可编辑的字符串??用任何语言??! :\

谢谢!

最佳答案

我认为唯一可能的是::

Reverse a string "word by word in place without using the swap function. The string in not-editable."

无论如何您都无法编辑不可编辑的字符串!

关于algorithm - 不使用交换函数反转不可编辑的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31644928/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com