Question 26Asked in Bihar STET 2024 Paper II Computer Science, 12 Jun 2024, Shift 1 (10:00 AM)

Which of the following is an example of a problem that can be solved using backtracking?निम्नलिखित में से कौन एक समस्या का एक उदाहरण है जिसे बैकट्रैकिंग का उपयोग करके हल किया जा सकता है?

निम्नलिखित में से कौन एक समस्या का एक उदाहरण है जिसे बैकट्रैकिंग का उपयोग करके हल किया जा सकता है?
  1. ACalculating the factorial of a numberएक संख्या के तथ्यात्मक की गणना
  2. BFinding the largest element in an arrayएक सरणी में सबसे बड़ा तत्व खोजने के लिए
  3. CSolving the Sudoku puzzleसुडोकू पहेली को हल करना
  4. DSorting an array using quicksortक्विकसॉर्ट का उपयोग करके एक सरणी को छाँटना
Show answerHide answer

Correct answer: (C) Solving the Sudoku puzzleसुडोकू पहेली को हल करना

Explanation

Sudoku is solved by backtracking. You place a digit, check the constraints, and undo the choice (backtrack) when no valid digit fits later. Factorial, finding the maximum and quicksort do not need trial and undo.Sudoku backtracking से हल होता है। आप एक अंक रखते हैं, constraints जाँचते हैं, और जब बाद में कोई वैध अंक न बैठे तो चुनाव को पलट देते हैं (backtrack)। Factorial, अधिकतम निकालना और quicksort में आज़माने और पलटने की ज़रूरत नहीं होती।

From Bihar STET 2024 Paper II Computer Science PYQ, 12 Jun 2024, Shift 1 (10:00 AM)

This is question 26 of Bihar STET 2024 Paper II Computer Science PYQ, 12 Jun 2024, Shift 1 (10:00 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.