✅  Java | Brute Force Approach
\n// Approach 1: Brute Force Approach - TLE\n\n// Time complexity: O(n^2)\n// Space complexity: O(n)\n\npublic int findMaximizedCapital(int k, int w, int[] prof
```\n// Approach 1: Brute Force Approach - TLE\n\n// Time complexity: O(n^2)\n// Space complexity: O(n)\n\npublic int findMaximizedCapital(int k, int w, int[] profits, int[] capital) {\n\tint n = profits.length;\n\tboolean[] finished = new boolean[n];\n\n\tfor (int i = 0; i < k; i++) {\n\t\tint prjIndex = -1;\n\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tif (capital[j] <= w && !finished[j]) {\n\t\t\t\tif (prjIndex == -1 || profits[j] > profits[prjIndex]) \n\t\t\t\t\tprjIndex = j;\n\t\t\t}\n\t\t}\n\n\t\tif (prjIndex == -1) \n\t\t\treturn w;\n\n\t\tw += profits[prjIndex];\n\t\tfinished[prjIndex] = true;\n\t}\n\n\treturn w;\n}\n```\n\n**Note:-** This solution gives TLE. It\'s provided just for understanig purpose.\n**Please upvote if you find this solution useful. Happy Coding!**
['Greedy', 'Java']