IT |
気になる、記になる… |
「watchOS 8.3」を搭載した「Apple Watch Series 7」で正常に充電出来ない問題が報告される |
https://taisy0.com/2021/12/23/150043.html
|
applewatchseries |
2021-12-23 00:07:22 |
TECH |
Engadget Japanese |
開始相次ぐ「キャリアメール持ち運び」は本当に必要なのか(佐野正弘) |
https://japanese.engadget.com/mail-003057936.html
|
佐野正弘 |
2021-12-23 00:30:57 |
ROBOT |
ロボスタ |
【動画】ソフトバンク白戸家と『呪術廻戦』がコラボ!お父さんが五条悟に変身!?オリジナルxRコンテンツ配信開始 |
https://robotstart.info/2021/12/23/jujutsu-kaisen-xr-content.html
|
人気作品 |
2021-12-23 00:00:53 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 「仕事への熱意が薄れた」4割 コロナ禍で変化 |
https://www.itmedia.co.jp/business/articles/2112/22/news160.html
|
itmedia |
2021-12-23 09:31:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 初代コペンやミラ・ジーノ……人気の旧型車を復活させた、琉球ダイハツの狙い |
https://www.itmedia.co.jp/business/articles/2112/23/news067.html
|
itmedia |
2021-12-23 09:21:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 美大はどんな「人材」を送り出しているのか 「普通の会社」で働くために |
https://www.itmedia.co.jp/business/articles/2112/23/news069.html
|
itmedia |
2021-12-23 09:16:00 |
TECH |
Techable(テッカブル) |
Thunderbolt 4対応ケーブル「Super Cable」のデータ転送速度は最大40Gbps、8K出力も |
https://techable.jp/archives/169577
|
kickstarter |
2021-12-23 00:00:44 |
デザイン |
コリス |
2022年用、日本語のフリーフォント570種類のまとめ -商用サイトだけでなく紙や同人誌などの利用も明記 |
https://coliss.com/articles/freebies/japanese-free-fonts.html
|
続きを読む |
2021-12-23 00:26:26 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
【Blender】テクスチャオブジェクトに謎の透明な線が入った |
https://teratail.com/questions/375173?rss=all
|
テクスチャをUV展開して貼り付けた顔面パーツのオブジェクトを動かしています。 |
2021-12-23 09:57:41 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
PC-FAXを使用したVBAは実現可能ですか? |
https://teratail.com/questions/375172?rss=all
|
PCFAXを使用したVBAは実現可能ですか前提・実現したいこと現在、毎月件以上の通知書を紙で印刷し、折って封筒に入れ発送しています。 |
2021-12-23 09:44:33 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Githubでファイル編集中に起こる、文章が勝手にペーストされる現象の解決策を見つけたい。 |
https://teratail.com/questions/375171?rss=all
|
Githubでファイル編集中に起こる、文章が勝手にペーストされる現象の解決策を見つけたい。 |
2021-12-23 09:34:13 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Twitter API v2によるフォロー処理 |
https://teratail.com/questions/375170?rss=all
|
TwitterAPIvによるフォロー処理Twitternbspapiが正式にvとなったことに伴い、自作のWebアプリphpについてもvからvに対応したいと考えています。 |
2021-12-23 09:31:55 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
GASとMySQLの接続ができない |
https://teratail.com/questions/375169?rss=all
|
GASとMySQLの接続ができない前提・実現したいことスプレッドシートで管理しているデータが膨大になってきたので、MySQLにデータを移行し、GASでデータを呼び出したいと考えております。 |
2021-12-23 09:29:56 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
deviseの複数モデル使用でauthenticate_user!を使用したい |
https://qiita.com/takuyahori/items/c781713d0d3bfcd1e523
|
authenticateuserを使用してログインしていない場合はログインページに遷移させる記述をしたかったが、複数モデルを使用しているためどちらかがログインしている場合でも片方の記述が適用されてしまう。 |
2021-12-23 09:01:46 |
Git |
Gitタグが付けられた新着投稿 - Qiita |
Githubの知らなかった雑学一選 |
https://qiita.com/ora_yoshito/items/ff798c1d2cfe72aad70f
|
activegraph |
2021-12-23 09:55:47 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
deviseの複数モデル使用でauthenticate_user!を使用したい |
https://qiita.com/takuyahori/items/c781713d0d3bfcd1e523
|
authenticateuserを使用してログインしていない場合はログインページに遷移させる記述をしたかったが、複数モデルを使用しているためどちらかがログインしている場合でも片方の記述が適用されてしまう。 |
2021-12-23 09:01:46 |
海外TECH |
DEV Community |
Binary Tree: Max Path Sum (approach and explanation) |
https://dev.to/ashutosh049/binary-tree-max-path-sum-approach-and-explanation-45gm
|
Binary Tree Max Path Sum approach and explanation Module Binary TreeYou can refer to the Leetcode problem Binary Tree Maximum Path SumIn my personal opinion this question has the ability to judge your analytical and tree traversal skills You must give it a try before jumping onto solution By that you might get to know how ruthless this problem is At the end of this article you would develop the thinking capability and would be able to solve problems like path sum longest branch diameter of a tree etc See related problems at the end Cheers Problem StatementGiven the root of a Binary Tree return the maximum path sum of any non empty path A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them A node can only appear in the sequence at most once Note that the path does not need to pass through the root The path sum of a path is the sum of the node s values in the path Example Input root Output Explanation The optimal path is gt gt with a path sum of Example Input root null null Output Explanation The optimal path is gt gt with a path sum of IntuitionWe first need to carefully understand the problem statement and note out some key points Path In first attempt it would sound like usual root to leaf path but that s a branch for any given root A path in general is a chain of or more adjacent connected and contiguous nodes It the path may or may not include root itself That s the essence of the question that it s asking for any path that gives us maximum sum when values added Non Empty Path This makes sense as we are not going to count a nil path At most once This must be taken into account that a valid path must not include a node more than once Now since we are clear that a path with max sum may exist without the root itself it means for whatever algo we deduce we need to visit each node in recursion May be our max path would be lying somewhere down See below examples to make it more clear Although there several path that are possible out of these nodes or edges Let s list them down Starting at node sum lt gt sum lt gt lt gt sum lt gt lt gt lt gt sum lt gt lt gt lt gt sum Starting at node sum lt gt sum lt gt lt gt sum lt gt lt gt sum Starting at node sum lt gt sum lt gt sum Starting at node sum lt gt lt gt sum Starting at node sum Note that the a path order does not matter while calculating the sum so a path gt will be same as gt Does it make any sense to return the max sum for path like lt gt lt gt with sum as No it s obvious that the output would be for path lt gt lt gt see nodes highlighted in green Let now try to build our logic now We shall taking into consideration each obvious permutations No left right sub tree Single node tree or a leaf node If you ever get your hands dirty with tree traversal you might have encountered the situation where curr is pointing to left most node or any leaf node We used to put this node onto stack as it s not null and after this our curr would be pointing to it s left or right as per the order Remember single node is also a valid path Now for path sum since we do not have anything as it s left or right we would be returning the node value directly What if the left and right child exists In that case we shall evaluate if that s profitable or not When sub tree exists Evaluating the Gain Profit Before going to logic can you tell us if we shall take amp into account to get a max sum No Why should we because we are good with only node Adding or into the path would further decrease our max value that s something like profit and loss So how shall we program this logic What about this one Shall we add the node now In previous diagram our max sum was In this if we take the new node our max sum becomes So our new path becomes gt gt that results in a max sum of To add to your surprise we are wrong here That s something that we need to take care We would not be taking the path from node to If you look closely only node alone is making a greater max path gt gt is less profitable as compared to path only We can deduce some key points here We need to get maximum sum for left child and right child Let s create a function someMethodToGetMaximumSumFromTreeNode that would accept a TreeNode int leftMax someMethodToGetMaximumSumFromTreeNode curr left int rightMax someMethodToGetMaximumSumFromTreeNode curr right If there are other branches to visit we can not take both left and right or in other words we can not have way path So we should choose a maximum out of these left max or right max and combine this path with parent to get a path Let s call it maxChildrenint maxChildren Math max leftMax rightMax We need to check if adding left or right whichever way is greater to current would increase or path sum or decrease How to do this We need to use Math max function with left and right int maxWithRoot Math max curr val curr val maxChildren We also need to check if left and right together along with root form a greater value or not This is something adding all the nodes if a tree Let s call this maxNode int maxNode Math max maxWithRoot root val leftMax rightMax Last part for calculating the max sum is if already found a greater path sum or is this a new greater sum We need to update our answer accordingly maxSum Math max maxSum maxNode So that was all about evaluating the profitability and assigining bigger max to our answer But we have not worked on the return type and it s logic for function someMethodToGetMaximumSumFromTreeNode This function for each tree node evaluates the maximum path sum up till root must be included in path sum the given root So for a tree leftMax would be and right max would be and the return value would be maximum of amp root value Do we already have such logic Yes See maxWithRoot and this is what we would return in our function Note that we are evaluating our answer in variable maxSum whereas the return value for the function is returned by maxWithRoot Complexity AnalysisTime complexity O N where N is number of nodes since we visit each node not more than times Space complexity O H where H is a tree height to keep the recursion stack In the average case of balanced tree the tree height H logN in the worst case of skewed tree H N program calling methdClass Solution int maxSum Integer MIN VALUE public int maxPathSum TreeNode root recurse root return maxSum recursive function to get max path sum int recurse TreeNode root if root null return int leftMax recurse root left int rightMax recurse root right int maxChildren Math max leftMax rightMax int maxWithRoot Math max root val root val maxChildren int maxNode Math max maxWithRoot root val leftMax rightMax maxSum Math max maxSum maxNode return maxWithRoot Test casesFor this particular I have pled up few edge cases that you should try before submitting your soltution null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null Related problemsPath SumSum Root to Leaf NumbersPath Sum IVLongest Univalue PathTime Needed to Inform All EmployeesDiameter of Binary TreePS Stay tuned for more such problem explanation and approaches |
2021-12-23 00:34:00 |
海外TECH |
DEV Community |
How to make make web site like this + |
https://dev.to/ivkemilioner/how-to-make-make-web-site-like-this--4fg3
|
web |
2021-12-23 00:33:14 |
Linux |
OMG! Ubuntu! |
Need a Thunderbird Tray Icon on Ubuntu? Try BirdTray |
https://www.omgubuntu.co.uk/2021/12/thunderbird-tray-icon-ubuntu
|
Need a Thunderbird Tray Icon on Ubuntu Try BirdTrayThunderbird is Ubuntu s default e mail client but it s not the most well integrated of tools ーat least not by default For instance some Linux apps e g Telegram show an unread count on the Ubuntu dock while the app is running This makes it easy to see for instance how many unread messages you have Thunderbird doesn t do this But this is open source software so you re not out of options One way to keep tabs on new mail as it arrives in Thunderbird is to install the BirdTray tool BirdTray is free open source software that s available to install This post Need a Thunderbird Tray Icon on Ubuntu Try BirdTray is from OMG Ubuntu Do not reproduce elsewhere without permission |
2021-12-23 00:25:03 |
海外科学 |
NYT > Science |
Omicron Infections Seem to Be Milder, Three Research Teams Report |
https://www.nytimes.com/2021/12/22/health/covid-omicron-illness.html
|
infections |
2021-12-23 00:35:32 |
海外TECH |
WIRED |
7 Rapid At-Home Covid-19 Tests—and Where to Find Them |
https://www.wired.com/story/best-rapid-at-home-covid-19-test-kits
|
antigen |
2021-12-23 00:30:00 |
医療系 |
内科開業医のお勉強日記 |
オミクロンの冬:COVID-19は冬の風物詩となるのか? |
https://kaigyoi.blogspot.com/2021/12/covid-19_23.html
|
重症度に関してはデータが限られていますが、現在のところ、オミクロンがより重症化するという明確な証拠はなく、南アフリカからの報告では、デルタ型に関連する病気よりも軽症である可能性が示唆されています。 |
2021-12-23 00:56:00 |
金融 |
ニュース - 保険市場TIMES |
ソニー損保、火災保険値上げで保険の実態と動向を調査 ダイレクト型へ見直し進む |
https://www.hokende.com/news/blog/entry/2021/12/23/100000
|
ソニー損保、火災保険値上げで保険の実態と動向を調査ダイレクト型へ見直し進む火災保険は年連続値上げソニー損保は月日、火災保険の相次ぐ値上げを受け、年に火災保険を契約した人の実態・動向を調査し結果を公表した。 |
2021-12-23 10:00:00 |
ニュース |
ジェトロ ビジネスニュース(通商弘報) |
EUデジタルCOVID証明書の有効期限を9カ月に正式決定 |
https://www.jetro.go.jp/biznews/2021/12/dfd2b9c461687c2c.html
|
正式決定 |
2021-12-23 00:40:00 |
ニュース |
ジェトロ ビジネスニュース(通商弘報) |
中銀が政策金利を0.5ポイント引き上げ5.5%に |
https://www.jetro.go.jp/biznews/2021/12/b7377bb626ba74da.html
|
引き上げ |
2021-12-23 00:25:00 |
ニュース |
BBC News - Home |
Pillar of Shame: Hong Kong's Tiananmen Square statue removed |
https://www.bbc.co.uk/news/world-asia-china-59764029?at_medium=RSS&at_campaign=KARANGA
|
pillar |
2021-12-23 00:09:23 |
ニュース |
BBC News - Home |
The Germany striker whose name means failure - and how he became a success |
https://www.bbc.co.uk/sport/football/59696612?at_medium=RSS&at_campaign=KARANGA
|
The Germany striker whose name means failure and how he became a successFrank Mill is known in Germany as the man behind the miss of the century But this charismatic ex striker has plenty more to say |
2021-12-23 00:01:08 |
LifeHuck |
ライフハッカー[日本版] |
家事時間を劇的に減らす「時産家電」4選〜電気ケトル&食洗機はマストバイ! |
https://www.lifehacker.jp/2021/12/jisan-kaden01.html
|
電気ケトル |
2021-12-23 10:00:00 |
北海道 |
北海道新聞 |
加藤内野手、来季は2A所属 ブルージェイズ傘下 |
https://www.hokkaido-np.co.jp/article/626444/
|
大リーグ |
2021-12-23 09:08:00 |
マーケティング |
AdverTimes |
若手クリエイターがBOVAに応募すべき3つの理由/BOVA2022 |
https://www.advertimes.com/20211223/article372218/
|
|
2021-12-23 00:49:11 |
海外TECH |
reddit |
🤣🤣🤣 This your man Hillary? Might want to get him some lotion for that burn 🔥 |
https://www.reddit.com/r/HilariaBaldwin/comments/rmifsl/this_your_man_hillary_might_want_to_get_him_some/
|
This your man Hillary Might want to get him some lotion for that burn submitted by u Beautiful Lecture to r HilariaBaldwin link comments |
2021-12-23 00:04:29 |
コメント
コメントを投稿