• 2024-03-27D. Birthday Gift
    原题链接题解1.异或是01变1,11变0,或是01变1,11变1,所以或的越多(即分的组越多),结果越大2.我们令x=x+1,这样小于等于x的问题就变成了小于x的问题,这里我们采用逼近答案的方法。3.对于某一位而言,如果有奇数个元素在这一位上是1,那么不管怎么分,最后的结果肯定是1,如果是偶数,那么最后的结
  • 2023-02-26数组类目:1207.独一无二的出现次数
    思路:哈希表首先使用哈希表记录每个数字的出现次数;随后再利用新的哈希表,统计不同的出现次数的数目。如果不同的出现次数的数目等于不同数字的数目,则返回true,否则返回false
  • 2022-10-01[Oracle] LeetCode 37 Sudoku Solver
    WriteaprogramtosolveaSudokupuzzlebyfillingtheemptycells.Asudokusolutionmustsatisfyallofthefollowingrules:Eachofthedigits1-9mustoc
  • 2022-09-26JDBCUtil
     importjava.io.File;importjava.io.FileInputStream;importjava.sql.Connection;importjava.sql.Date;importjava.sql.DriverManager;importjava.sql.Prep
  • 2022-08-24[Oracle] LeetCode 696 Count Binary Substrings
    Givenabinarystrings,returnthenumberofnon-emptysubstringsthathavethesamenumberof0'sand1's,andallthe0'sandallthe1'sinthesesubstring