Calculating Algorithm Efficiency

Hello, I started doing leetcode to expand my programming understanding. I did the problem which employee earns more than their manager, and want to know if I calculated the efficiency correctly. / https://leetcode.com/problems/employees-earning-more-than-their-managers/

I put the data into two separate tables to access them more efficiently.

local employees = {
	[1] = {
		Name = "Joe",
		Salary = 70000,
		ManagerId = 1
	},
	[2] = {
		Name = "Henry",
		Salary = 80000,
		ManagerId = 2
	}
} 
local managers = {
	[1] = {
		Name = "Sam",
		Salary = 60000,
	},
	[2] = {
		Name = "Max",
		Salary = 90000
	}
}

For checking all the employees Salary I use a for loop. This makes it O(n) n being the length of the dictionary and since each check of salary is O(1) it will just be O(n) for whole loop. The if statement is a logical calculation and I read that those are O(1). This is the most efficient way because I go through a hashtable and then to a look up (I think lol).

local employees = {
	[1] = {
		Name = "Joe",
		Salary = 70000,
		ManagerId = 1
	},
	[2] = {
		Name = "Henry",
		Salary = 80000,
		ManagerId = 2
	}
} 
local managers = {
	[1] = {
		Name = "Sam",
		Salary = 60000,
	},
	[2] = {
		Name = "Max",
		Salary = 90000
	}
}

for _, employeeData in pairs(employees) do
	if employeeData.Salary > managers[employeeData.ManagerId].Salary then
		print(employeeData.Name .. " salary of " .. employeeData.Salary .. " is more than their manager, " .. managers[employeeData.ManagerId].Name .. " salary of"  .. managers[employeeData.ManagerId].Salary)
	end
end

With this amount of data, it certainly is. But be aware that in this case O(n) = Ω(n) <=> Θ(n) since it will always run n times.
I don’t think there will be a more efficient way to do this, Θ(n) is already a good algorithm efficiency.

What you mostly can do for calculating O/Omega/Theta is counting the nested for- and while loops. If the function is iterative, this will give you the efficiency very easily. If the function is recursive, it is a lot different and much harder to calculate.