หาตัวเลขที่มากที่สุดในอาร์เรย์ ตัวอย่าง: [10, 324, 45, 90, 9808] → 9808 วิธีแก้ปัญหา (Linear Scan) กำหนด max = arr[0] max → max = arr[i] คืนค่า max ตัวอย่างโค้ด C++ #include <bits/stdc++.h> using namespace std; int largest(int arr[], int n) { int max = arr[0]; for (int i = 1; i