, the while loop runs till there is only one candidate left in the sta การแปล - , the while loop runs till there is only one candidate left in the sta ไทย วิธีการพูด

, the while loop runs till there is

, the while loop runs till there is only one candidate left in the stack. The last candidate will not be examined as it will not enter the loop. But we will have either A or B as winner excluding the candidate in the stack (i.e. after while loop we will have pseudo winner). We need to compare this winner with the one left in the stack. Use a flag to discriminate between A and B, to keep track of who would be the last winner. Instead I have used one more excess comparison.

The problem is, in the content I have explained to pop off two candidates and compare, but in the code I am popping off only one, and keeping tracking track of last winner by popping in the if-else clauses. If we pop off two candidates and push the winner back to stack, we don't need these conditions.

Take the input like the first candidate who will be pushed into stack as the celebrity or take input there is no celebrity.
0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
ในขณะวนรอบทำงานจนมี ผู้เดียวที่เหลือในกองซ้อน ผู้สมัครล่าสุดจะไม่ถูกตรวจสอบจะเข้าวงการ แต่เราจะเป็น A หรือ B เป็นผู้ชนะยกเว้นผู้สมัครในกองซ้อน (เช่นหลังจากที่ในขณะที่วง เราจะมีผู้ชนะหลอก) เราต้องเปรียบเทียบผู้ชนะนี้กับหนึ่งในกองซ้อน ใช้ค่าสถานะเพื่อเหยียดระหว่าง A และ B การติดตามที่จะเป็นผู้ชนะสุดท้าย แต่ ฉันได้ใช้เปรียบเทียบเกินกว่าหนึ่งปัญหา คือ ในเนื้อหาผมได้อธิบายคั่วสองผู้สมัครและเปรียบเทียบ แต่ในโค้ด ผม popping ออกเดียว และเก็บการติดตามของผู้ชนะสุดท้าย โดย popping ในประโยคถ้าอื่น ถ้าเราป๊อปปิดสมัครสอง และผลักดันผู้ชนะกลับการกองซ้อน เราไม่ต้องการเงื่อนไขเหล่านี้ใช้ป้อนข้อมูลเช่นตัวเลือกแรกที่จะผลักเข้ากองเป็นเซเลบริตี้ หรือนำเข้ามีชื่อเสียงไม่
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!
, the while loop runs till there is only one candidate left in the stack. The last candidate will not be examined as it will not enter the loop. But we will have either A or B as winner excluding the candidate in the stack (i.e. after while loop we will have pseudo winner). We need to compare this winner with the one left in the stack. Use a flag to discriminate between A and B, to keep track of who would be the last winner. Instead I have used one more excess comparison.

The problem is, in the content I have explained to pop off two candidates and compare, but in the code I am popping off only one, and keeping tracking track of last winner by popping in the if-else clauses. If we pop off two candidates and push the winner back to stack, we don't need these conditions.

Take the input like the first candidate who will be pushed into stack as the celebrity or take input there is no celebrity.
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!
, ในขณะที่วงวิ่งจนมีเพียงหนึ่งผู้สมัครที่เหลือในกอง ผู้สมัครล่าสุดจะไม่ตรวจจะไม่ใส่ห่วง แต่เราจะมีทั้ง A หรือ B เป็นผู้ชนะไม่รวมผู้สมัครในกอง ( เช่นหลังจากในขณะที่วงเราจะได้ผู้ชนะเทียม ) เราต้องเปรียบเทียบกับหนึ่งในผู้ชนะซ้ายสแต็ค ใช้ธงเพื่อแยกแยะระหว่าง A และ Bเพื่อติดตามว่าใครจะเป็นผู้ชนะสุดท้าย แต่ผมได้ใช้เกินอีก เปรียบเทียบ

มีปัญหาอะไร ในเนื้อหาที่ผมได้อธิบายไปแล้วสองคน และเปรียบเทียบ แต่ในโค้ดผมโผล่ออกมาเพียงหนึ่งและการติดตามการติดตามผู้ชนะล่าสุดโดย popping ในถ้าอีกประโยค ถ้าเราตายสองผู้สมัครและผลักดันให้ผู้ชนะกลับกอง เราไม่ต้องการเงื่อนไขเหล่านี้

เอาใส่เหมือนแรกผู้สมัครจะถูกผลักเข้าสู่กองเป็นดารา หรือเอาใส่ไม่มีดารา
การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2025 I Love Translation. All reserved.

E-mail: