| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| ┌──────────────────────────────┬────────────────────┬─────────────────────────────────────────────────┐ | |
| │ Question │ Attr Params │ Sample Args │ | |
| ├──────────────────────────────┼────────────────────┼─────────────────────────────────────────────────┤ | |
| │ Last n Days spend for card │ card,Day1-Day n │ card#ABCD,(Day-2021-09-05,Day-2021-08-30) │ | |
| │ Last 4 Weeks spend for user │ user,Week 1-Week 7 │ user#1234,(Week-2021-36,Week-2021-33) │ | |
| │ Total spend for organization │ org,Total │ org#12AB,(Total) │ | |
| │ Monthwise Purchase for Team │ team,Month │ org#12AB#team#22,(Month-2021-06, Month-2021-02) │ | |
| └──────────────────────────────┴────────────────────┴─────────────────────────────────────────────────┘ |
| package co.in.shoonya.abc.prep.ds.lists; | |
| import co.in.shoonya.abc.prep.ds.lists.ds.ListNode; | |
| public class AggregateAtZeroNode { | |
| public static void main(String[] args) { | |
| ListNode<Integer> l1 = new ListNode<Integer>(1); | |
| l1.setNext(new ListNode<Integer>(4)); | |
| l1.getNext().setNext(new ListNode<Integer>(0)); |
| package co.in.shoonya.abc.kata; | |
| public class CdkShoppingCart { | |
| public static void main(String[] args) { | |
| System.out.println(billAmount(CustomerType.Regular, 15000d)); | |
| System.out.println(billAmount(CustomerType.Premium, 20000d)); | |
| } | |
| private static double billAmount(CustomerType type, double input) { |
| package co.in.shoonya.abc.prep.ds.classic.strings; | |
| // Given a string of characters (a, b, c,....z), we want to break the string into a maximum number of substrings | |
| // in which every character comes in only one substring. We have to return length of all substrings. | |
| // Ex 1: Input string = "abcdefgahijklhopqrsot" | |
| // Output = [8, 5, 6, 1] | |
| // Ex 2: Input string = "abcd" | |
| // Output = [1, 1, 1, 1] | |
| import java.util.*; |
| package com.example; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| import java.util.HashSet; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Set; | |
| public class GridQuestion { |
| <speak> All good except 2 escalations. <break time=“1s”/> We had 5 new deployments and have new release coming this Friday</speak> |
| [{"address":{"street":"Oude Ebbingestraat","housenumber":"12","postalcode":"9712 HJ","city":"Groningen","geoLocation":{"lat":"53.219319","lng":"6.56671"}},"distance":0,"type":"ING"},{"address":{"street":"Amsterdamsestraat","housenumber":"9","postalcode":"2587 CN","city":"Den Haag","geoLocation":{"lat":"52.111805","lng":"4.287714"}},"distance":0,"type":"ING"},{"address":{"street":"Oudenoord","housenumber":"1","postalcode":"3513 EG","city":"Utrecht","geoLocation":{"lat":"52.0970886","lng":"5.1133961"}},"distance":0,"type":"ING"},{"address":{"street":"Bloemenoordplein","housenumber":"50","postalcode":"5143 TC","city":"Waalwijk","geoLocation":{"lat":"51.6823433","lng":"5.0782567"}},"distance":0,"type":"ING"},{"address":{"street":"Dorpsstraat","housenumber":"2","postalcode":"2361 BB","city":"Warmond","geoLocation":{"lat":"52.195528","lng":"4.502244"}},"distance":0,"type":"ING"},{"address":{"street":"Waalderstraat","housenumber":"48","postalcode":"1791 EC","city":"Den Burg","geoLocation":{"lat":"53.056402","lng":"4 |
| chapter 4: Expressions and Simple functions | |
| =========================================================================================================================== | |
| There are 2 types of expressions. | |
| 1. def x = 5 | |
| 2. val x = 5 | |
| Here # 1 represens definition and expression is at the right hand side of the = sign. It is not evaluated immediately. | |
| Here # 2 represents value expression and its value is evaluated immediately and whenver val is being used; it replaces | |
| it with pre-computed value of expression. |