Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- l = Table[RandomInteger[{1, 10^6}], {1000}];
- ls = Sort[l];
- index = -1; Do[If[ls[[i]] == ls[[i + 1]], index = i], {i, 1, Length[ls] - 1}];
- pos = Position[Partition[l, 20], ls[[index]]];
- Grid[Partition[l, 20], Frame -> All, FrameStyle -> Lighter[Gray], Background -> {None, None, If[index != -1, {pos[[1]] -> Lighter[Orange],
- pos[[2]] -> Lighter[Orange]}, None]}] //
- Style[#, FontSize -> 9] &
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement